Skip to content
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

Disallow tracking queries for owned entities without their owners #13036

Closed
AndriySvyryd opened this issue Aug 16, 2018 · 9 comments · Fixed by #16997
Closed

Disallow tracking queries for owned entities without their owners #13036

AndriySvyryd opened this issue Aug 16, 2018 · 9 comments · Fixed by #16997
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@AndriySvyryd
Copy link
Member

Querying Customer.Address should also bring in the Customer for tracking queries as there's no reason to track an owned entity without its owner.

@ajcvickers
Copy link
Contributor

Another option discussed in triage is to make queries for non roots of the aggregate always be no-tracking.

Referencing from #1985 to consider as part of the overall aggregate behaviors.

@AndriySvyryd
Copy link
Member Author

We will throw for now, until the Include pipeline supports including the owner without a navigation.

@ajcvickers
Copy link
Contributor

Decisions:

  • Owned entities cannot be tracked without their owner.
  • Querying for owned entities without their owners must be no-tracking.
  • Throw if the query would have been tracking; don't silently become no-tracking.

@ajcvickers ajcvickers changed the title Automatically include the owner for tracking queries Disallow tracking queries for owned entities without their owners Jan 24, 2019
@ajcvickers ajcvickers self-assigned this Jul 24, 2019
@smitpatel
Copy link
Contributor

@AndriySvyryd - What is the status of this one. #13579 said to apply decision for here but that issue is closed now. Does that mean this one has been fixed?

@AndriySvyryd
Copy link
Member Author

#13579 was about tracking both the owner and the owned, that works now.
We still need to throw if owner is not included.

@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 6, 2019
@smitpatel
Copy link
Contributor

Poaching! 😉

@smitpatel
Copy link
Contributor

@ajcvickers - Do we need to announce this as breaking change somewhere?

@ajcvickers
Copy link
Contributor

@smitpatel We should, but it's a low-impact. I can do it.

@ajcvickers
Copy link
Contributor

@smitpatel @AndriySvyryd I started writing it, but it's actually more of a bug that we ever tried to do this--an I couldn't even make it work in simple cases on 2.2, so I think it's fine to treat this as a bug we fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants