-
Notifications
You must be signed in to change notification settings - Fork 3.3k
ComplexType
entities are null if Skip()
is applied to an IQueryable
that uses a static method for Select
mapping.
#18140
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
Include seem to be ignored in first case. |
@smitpatel According to the list of breaking changes, there shouldn't have been any changes to how |
@vegardlarsen this is being investigated by @smitpatel and is probably a bug. The list of breaking changes only lists intentional breaking changes we made knowingly, but of course unintentional bugs slip through. |
[ConditionalFact]
public virtual void TEsting_issue_18140()
{
using (var context = CreateContext())
{
var query = context.Set<OwnedPerson>().Select(e => Map(e)).Skip(0).ToList();
}
}
private static int Map(OwnedPerson p) => p.PersonAddress.Country.PlanetId; |
smitpatel
added a commit
that referenced
this issue
Dec 30, 2019
- 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
smitpatel
added a commit
that referenced
this issue
Dec 30, 2019
- 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
smitpatel
added a commit
that referenced
this issue
Jan 1, 2020
- 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
smitpatel
added a commit
that referenced
this issue
Jan 1, 2020
- 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
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
ComplexType
entities arenull
ifSkip()
is applied to anIQueryable
that uses a static method forSelect
mapping.Steps to reproduce
I can't quite make heads or tails of this, but changing any of these things makes the problem disappear:
.Select(t => t.One.A)
Further technical details
EF Core version: 3.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer and Microsoft.EntityFrameworkCore.InMemory
Target framework: .NET Core 3.0
Operating system: Windows 10
IDE: LINQpad 6 (and Visual Studio 2019)
The text was updated successfully, but these errors were encountered: