-
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
Owned collection when owner has composite PK throws translation failure #23130
Comments
Issue: When OwnsMany parent has a composite PK, translation will fail. efcore/src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitor.cs Lines 1350 to 1352 in 25727cd
Above needs to do processing like efcore/src/EFCore/Query/Internal/NavigationExpandingExpressionVisitor.ExpressionVisitors.cs Lines 395 to 407 in 25727cd
|
@smitpatel Regression? |
@ajcvickers - Possible. Many changes affected this area in 5.0. I did not test on 3.1 |
Resolves #23130 Some additional tests changed because it ended up causing client eval in the middle due to another level of OwnsMany
@ajcvickers - Confirmed this regression from 3.1 release. |
@smitpatel Let's prepare a fix for Tactics. |
@ajcvickers - Done in #23143 |
Resolves #23130 Some additional tests changed because it ended up causing client eval in the middle due to another level of OwnsMany
I created a model where I have
OwnsMany
property used on 2 levels. Code sample belowWhen running saving Entity works, but when trying to read Entity from sql database (
await dbContext.Entities.ToListAsync();
) I get exception:Switching the model to
HasMany
for bothChild
andOwned
does not cause exception.EF Core version: 5.0.0-rc.2.20475.6
Database provider:Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 5.0
Operating system: Ubuntu 18.04
IDE: Visual Studio Code 1.50.1
The text was updated successfully, but these errors were encountered: