Skip to content
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

Select() method returns incorrect data #497

Closed
JKennedy24 opened this issue Jan 13, 2017 · 4 comments
Closed

Select() method returns incorrect data #497

JKennedy24 opened this issue Jan 13, 2017 · 4 comments

Comments

@JKennedy24
Copy link

JKennedy24 commented Jan 13, 2017

Using V1.2.1

I am writing some Integration tests using my .Net4.5 library.

I have the following:

var customerIds = database.Table<Customer>().Select(customer => customer.Id);

This returns the correct amount of customers but all Id's are 0 (default value).

But if I do:

var customerIds = database.Table<Customer>().ToList().Select(customer => customer.Id);

this returns the correct information.

This leads me to conclude the Select() method is broken

@corradolab
Copy link

Indeed.

I worked around it commenting out the whole Select function declaration in SQLite.cs (row 2809).

@ryanohs
Copy link

ryanohs commented Feb 9, 2017

I ran into this same issue.

@JKennedy24
Copy link
Author

Select Statement that causes this is here: https://github.com/praeclarum/sqlite-net/blob/master/src/SQLite.cs#L2809. I dont know enough about the library to know where the error lies though

@praeclarum
Copy link
Owner

Projection isn't supported yet on the DB side; however a recent change will make this work (though it's not efficient).

2c5f1e1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants