-
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
Allow non-composable raw SQL queries for TPH non-root types #24157
Milestone
Comments
@smitpatel to find general issue. |
Maybe This would allow to use multiple Sql commands ending with semicolon in query. Posted also in https://www.postgresql.org/message-id/c18b027c-4629-58a5-a499-64dc8a233e8f%40hot.ee |
Related #21888 |
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #18232, we allowed non-composable raw SQL queries for TPH root types, by eliminating the discriminator predicate when it is configured as complete. However, it is still impossible to use non-compsable raw SQL for querying non-root types.
I'm guessing that was discussed before, but... we could say that with raw SQL queries, it's the user's responsibility to write the SQL such that only the correct entity type comes back, and therefore not add the discriminator predicate in EF. If the user's SQL is wrong, unexpected entity types will come back and materialization would fail.
Originally requested by @kobruleht in npgsql/efcore.pg#1700
The text was updated successfully, but these errors were encountered: