-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add relational JSON mapping support for complex types #31252
Comments
If the property being mapped here is a collection [of value objects], perhaps structural equality should be preferred on the collection. The value objects inside can simply override |
@Timovzl structural equality is definitely planned for the collections, just as it already works for the complex types themselves. However, in change tracking EF doesn't compare complex types to one another directly (e.g. via their Equals), but rather compares the properties contained in the complex types (since it needs to know which properties changed). |
This comment was marked as off-topic.
This comment was marked as off-topic.
Shouldn't be stored in JSON because complex type only meant for the app designed for it. DB itself should considered accessed by other app as well such as SSMS. But I do prefer complex type in my App while keeping flat for SSMS or others. |
@inetdevgit I'm not sure what you mean in your comment... This issue is about allowing complex types to be mapped to JSON, but by default, non-collection complex types will still be "flattened" (i.e. no mapped as JSON). For collections of complex types, we don't plan to support any other mapping form other than JSON. Regardless, storing data as JSON columns is a standard and supported SQL Server feature, and not some EF-specific thing; needing to use SSMS (or other apps) should not be a reason to avoid JSON. |
No description provided.
The text was updated successfully, but these errors were encountered: