-
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
Query: Projected values can be the wrong type #6337
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Comments
Poaching this. |
ajcvickers
added a commit
that referenced
this issue
Aug 20, 2016
Issue #6337 The expression tree has converts in it to box the returned values. But this means we always ask for object from the reader. Therefore, use the value inside the convert when asking for the value from the data reader.
ajcvickers
added a commit
that referenced
this issue
Aug 22, 2016
Issue #6337 The expression tree has converts in it to box the returned values. But this means we always ask for object from the reader. Therefore, use the value inside the convert when asking for the value from the data reader.
ajcvickers
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Aug 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Consider this query:
The types of properties Id, Name, and Poles are int, string, int respectively. So the expectation is that the projected values in the array would be of those types. However, on SQLite, the values are of type long, string, long. That is, the types are the defaults from the store and not the requested types. I expect the same issue would exist on SQL Server in places where the type is relevant.
Note that if I let LINQ to Objects to do the projection:
then the types in the array are int, string, int, as expected.
However, in the real code I can't use LINQ to Objects for this because I am using EF.Property calls to project shadow values.
This bug currently prevents GetDatabaseValues from working on SQLite.
The text was updated successfully, but these errors were encountered: