-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection clear with equalitycomparision #79
Comments
It should as long as your CreateMap is called in the MyMapperProfile. I honestly haven't tried the BuildExecutionPlan to see if it's in sync or not. Also I'm not 100% sure when you map a class to itself it will mess up the equality logic or not. AutoMapper doesn't allow that by default and it's more of a hack in this instance. Another thing could be that |
Oh I might know what the issue might be. You have to set EnabledGroups to a value on constructor or parameter initialization.
This should fix the updating problems in Entity Framework |
Thank you very much. Thank you for your help. |
For your DTO's it's recommended not to have circular references, because it causes things like that. Also causes issues with projection and setting a max depth to stop the circular reference. Best would be to make a new GroupPerUserVM and not include UserProfile property and that should cause the least amount of problems going forward. |
Sure, thank you . I usually avoid circular references excluding property from Json serialization. |
Source/destination types
Mapping configuration
Version: 6.2.2
Expected behavior
From my understanding using AddCollectionMappers collections have to be updated depending on equality comparision.
Actual behavior
In this case i see that collection is first cleared then filled. This produce an issue with EF changeTracker.
Steps to reproduce
The text was updated successfully, but these errors were encountered: