-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[3.0] Owned types are null when Select, Skip and Take are used with Sqlite #18734
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@smitpatel Is this a duplicate of #18672 If so, maybe we should prepare a patch. |
Both of them happens in same area but this has different root cause. Above case specifically is about doing client projection in non-last operation. Any operation which does pushdown can cause not loading the properties. The fix would be somewhat non-trivial because we are going to change what we have been doing in processing skip/take in nav expansion since we have moved to new pipeline. It can make some queries which are getting translated right now fail. |
Note from triage: Putting this in 5.0 for the same reason as #18672 |
- Skip/Take does not force applying pending selector and changing shape. - Throw translation failure message for Querayble methods which we don't translate (hence we don't process in navigation expansion). Earlier we threw query failed message. Now Navigation Expansion does not throw QueryFailed error message from any place. - Unwrap type conversion for validating member access during include expansion so that we don't generate include when derived type's member is accessed. Resolves #18140 Resolves #18374 Resolves #18672 Resolves #18734 Resolves #19138 Resolves #19207
- Skip/Take does not force applying pending selector and changing shape. - Throw translation failure message for Querayble methods which we don't translate (hence we don't process in navigation expansion). Earlier we threw query failed message. Now Navigation Expansion does not throw QueryFailed error message from any place. - Unwrap type conversion for validating member access during include expansion so that we don't generate include when derived type's member is accessed. Resolves #18140 Resolves #18374 Resolves #18672 Resolves #18734 Resolves #19138 Resolves #19207
- Skip/Take does not force applying pending selector and changing shape. - Throw translation failure message for Querayble methods which we don't translate (hence we don't process in navigation expansion). Earlier we threw query failed message. Now Navigation Expansion does not throw QueryFailed error message from any place. - Unwrap type conversion for validating member access during include expansion so that we don't generate include when derived type's member is accessed. Resolves #18140 Resolves #18374 Resolves #18672 Resolves #18734 Resolves #19138 Resolves #19207
- Skip/Take does not force applying pending selector and changing shape. - Throw translation failure message for Querayble methods which we don't translate (hence we don't process in navigation expansion). Earlier we threw query failed message. Now Navigation Expansion does not throw QueryFailed error message from any place. - Unwrap type conversion for validating member access during include expansion so that we don't generate include when derived type's member is accessed. Resolves #18140 Resolves #18374 Resolves #18672 Resolves #18734 Resolves #19138 Resolves #19207
Hello there, I've found an eerie behavior with EFCore 3.0 and Sqlite. Owned types are null when I use Select, Skip and Take because their fields do not appear in the SQL query. Here's a repro project.
https://github.com/BrightSoul/repro-skip-take-issue
Here's the gist of it: a simple entity having a
CurrentPrice
property of typeMoney
.And here's
Money
, very simple.Here's the mapping for
Course
. As you can see,Money
is an owned type.Now I run this LINQ query. As you can see there's a Select invoking a static mapping method (because reasons) and Skip and Take are used.
Here's the issue: all items in
courseList1
have a nullCurrentPrice
property. I had no problem with ASP.NET Core 2.2.If, instead, I omit Skip and Take, everything is working fine. All of the items in
courseList2
have a proper value for theCurrentPrice
property.Again, here's the repro. It's a very simple ASP.NET Core application.
https://github.com/BrightSoul/repro-skip-take-issue
I know I should have made a Unit Test project but it's 1 AM and I'm about to fall asleep on the keyboard after trying to understand this problem for 3 hours. Sorry.
Would you please take a look?
Thanks,
Moreno
The text was updated successfully, but these errors were encountered: