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

Reconsider navigations on query type #14481

Closed
smitpatel opened this issue Jan 21, 2019 · 3 comments
Closed

Reconsider navigations on query type #14481

smitpatel opened this issue Jan 21, 2019 · 3 comments

Comments

@smitpatel
Copy link
Contributor

No description provided.

@sandersaares
Copy link

The OP is rather terse so I do not know what it is about but I also find myself doing "manual navigations" when working with query types, which seems needless.

For a specific example, if I know that my Movie query type has a list of MovieActor query types, right now I need to manually join the MovieActors to the Movie because I cannot define a Movie.Actors collection and have EF Core hook up the navigation collection on its own.

This is not excessively difficult but is a small thing that EF Core could just take care of for me.

@ajcvickers
Copy link
Member

Notes from triage: Issue #14194 is tracking merging query types and entity types. At that point all navigations will be allowed except those that reference an entity type with no key as the principal end.

@ajcvickers
Copy link
Member

Update to the note above. After further discussion, all navigations to query types will be disallowed. This is because:

  • There is a point of view which says references to query types is not needed. That is, in a well-defined model query types should only ever have references to entity types. Query types should never reference other query types, and should never reference entity types, even if the query type has an FK property and there is an entity type with a PK that matches that FK.
  • This means that even though query types cannot be tracked, they could be used to pull in entity types that are tracked without ambiguity. (Note that this is not implemented yet.)

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants