-
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
Query: projecting naked correlated collection when tracking should return collection object of it's parent entity #14046
Comments
Triage: Added a reference from the 3.0 queries issue. |
This was discussed recently in a design meeting and the conclusion was:
This means:
The behavior could be somewhat misleading, but in several years and several O/RM products that support LINQ, we haven’t seen significant evidence that this type of behavior causes bad problems. |
when we issue this query:
currently we generate a new instance of Orders collection type. Instead we could/should grab the collection instance from the parent entity and use it instead. This way we can better handle all exotic cases, where customer collection is exposed as interface, doesnt have parameterless ctor etc.
In fact, we could potentially leverage include pipeline for this case. Include gets parent entity and collection of its children, associates them together and returns the parent entity. For this case the only difference is that we have to return collection instead.
The text was updated successfully, but these errors were encountered: