-
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
Invalid column name 'key' in SQL Server JSON query #32910
Comments
Confirmed that this is another referential integrity bug, where TableReferenceExpression is shared by two columns within a multi-referenced SelectExpression; this is very similar to #32234, but when tables get replaced via SelectExpression.Update instead of via VisitChildren. This is not a regression: the repro requires composing a query on top of a collection instead a JSON owned entity, which is a feature that we added in 8.0. I have a fix standing by (https://github.com/roji/efcore/tree/UpdateReferentialIntegrity) - if many users run into this, we can consider patching. (once again, this is already fixed for 9.0) |
Hi can we have a fix for this in EF Core 8 as well since that is supposed to be LTS. I have just upgraded my app to dotnet 8 to take advantage of JSON columns. Similar to the original issue, getting |
@diablo2947 the fix here is a pretty huge rearchitecting in EF's query pipeline that happened for EF 9.0 (#32812), and that's certainly not something we'd backport to 8.0. Unfortunately, not all fixes can be backported to the LTS, and we haven't received user requests for a backport so far (yours is the first). |
@diablo2947 that's great to hear. Yeah, I'd absolutely recommend going to 9.0 unless you have some very strict policy to be on LTS. |
The repro below causes the following exception to be thrown in release/8.0, but not in main:
Repro
The issue disappears in main after #32812, which was a big query architecture rewrite. This is most likely another mutability-related referential integrity bug, similar to #32234.
Originally opened by @SergMarkovych in npgsql/efcore.pg#3066
The text was updated successfully, but these errors were encountered: