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

Query: FromSql with auto-included navigations sharing same table #21781

Open
Tracked by #21888
smitpatel opened this issue Jul 25, 2020 · 4 comments
Open
Tracked by #21888

Query: FromSql with auto-included navigations sharing same table #21781

smitpatel opened this issue Jul 25, 2020 · 4 comments

Comments

@smitpatel
Copy link
Contributor

This is not about owned entities which are eagerly loaded always and share table by convention.

This is specifically about user configuration when table is shared and also the navigation is marked as AutoInclude.

If user specify FromSql on an entity sharing table (principal/dependent either side is fine), and if the other side is getting included due to AutoInclude, is it good assumption to make that FromSql will also provide the data about the other side?

Currently since there is no ownership or weak entity, each entity type is separate query root and they use their own mapping so the other side will generate a join and get data from the table where it is stored.

@smitpatel
Copy link
Contributor Author

Also @AndriySvyryd wrote

@smitpatel I understand that it's possible, it just seems ambiguous as to what shape FromSql expects when there are auto-includes with table-splitting. Perhaps this (and the owned case) can be overridden by an explicit Include.

@smitpatel
Copy link
Contributor Author

Also see #14525 which is about FromSql for whole query (query root + all includes)

@ajcvickers
Copy link
Member

Notes from triage:

@smitpatel
Copy link
Contributor Author

Blocked on #21888

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

2 participants