Starts in:
2 DAYS
0 HR
35 MIN
47 SEC
Starts in:
2 D
0 H
35 M
47 S

Activities of "riley.trevillion"

@muhammedaltug I have been able to solve the problem using your provided code sample. Thank you!

@albert @hikalkan

I see. Thankyou for clarifying what needs to be done. It is a shame that I can't define a navigation property on the IdentityUser entity given how much it would simplify things. Perhaps it could be a future feature or enhancement? Nevertheless, I have manually created the joining entity based on the code provided to solve my problem.

Thankyou again

Hi @albert

I've generated a sample TestEntity -> IdentityUser many to many relationship using the latest version of ABP Suite (5.2) and observed the outputed code. It appears to be setting up the relationship using the more traditional method of manually defining the joining entity, joining properties, database configuration etc.

EFCore 6 allows us to define many to many relationships between 2 entities directly in Fluent API without needing to manually define all the boilerplate code that the ABP Suite is creating to faciliate a many to many relationship. For reference please see Microsoft documentation here

  • https://docs.microsoft.com/en-us/ef/core/modeling/relationships?tabs=fluent-api%2Cfluent-api-simple-key%2Csimple-key#many-to-many

In my situation the ABP Suite generated code in the screenshot above would simply be a 'HasMany()' -> 'WithMany()' definition i.e 2-3 lines of code without needing any joining entity defined. I'm trying to utilise this by defining the joins like you can see in this Microsoft documentation link and in the screenshots in my comment when first opening this issue.

  • https://docs.microsoft.com/en-us/ef/core/modeling/relationships?tabs=fluent-api%2Cfluent-api-simple-key%2Csimple-key#join-entity-type-configuration

The error when defining the join property using the EfCoreEntityExtensionMappings feature on the IdentityUser entity is what appears to be causing my issue.

I'd like to not have to manually define the join entities and all the boilerplate that goes with that when there's a supported feature of EFCore 6 that lets us do many to many in a very simple and clean way.

Additionally (and quite importantly for our requirements), using the ABP Suite to generate the code doesn't seem to allow me to pull a list of users out the database and access the associated entities on the join property (TestEntities) as it doesn't exist in this implementation. The way I'm trying to do it (theoretically) should allow me to do this.

Should EfCoreEntityExtensionMappings support the ability to define a navigation property on IdentityUser (i.e my issue is a bug), or is this an enhancement that could be made to support this?

Thankyou

The service bot automatically closed this issue. Bumping to reopen it.

Has there been any further progress on this one since last week?

Thankyou

Hello

Just checking in to see if there are any updates on this one?

Thankyou

@albert

Yes, all of our clients are currently on 4.3.X

If the fix is small, perhaps I can apply it manually until we schedule the work in to perform the upgrades to 4.4.X

What do you think?

Hi @albert

Are you able to tell me which of the releases the fix will be available in? 4.3-patch, 4.4-patch or 5.0?

Thankyou

@Mehmet No worries, thankyou

@gterdem @albert

Very much appreciated for providing the fix early.

I have added the code to the relevant places in our solution and it appears to have resolved the issue. I am forced to verify my email on creation and on subsequent logins for an external user. I will pull in the new 4.3.X patch version when it becomes available, but for now this works very nicely, so thankyou

I will close this ticket off now.

@gterdem yes that is the issue as you have described it. Good to hear you have fixed it, thankyou for that.

Ordinarily I'd be happy to wait for the patch release to come out to pick the fix up, but I know there are people on my side who are quite keen to see this problem fixed with a certain degree of urgency.

If the fix you have implemented is relatively simple (few lines of code / a couple of functions), would it be possible for you to share it here or privately with me so that I can add it temporarily to our codebase until the official patch release drops?

Thankyou again

Showing 1 to 10 of 26 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06