epsilonlabsllc / DataManagement

Android Local Database Library for Easily Storing Objects
52 stars 10 forks source link

Can't reteive rows based on boolean. find(Class<Movie> cls, String fieldName, boolean value) #5

Open Brblol opened 10 years ago

Brblol commented 10 years ago

After inspecting the database, i saw that boolean variables were stored as interger, this is fine but now I can't retrieve them based on the boolean variable.

dm.find(Movie.class, "isHidden", true) returns column does not exist exception dm.find(Movie.class, "isHidden", 1) returns mismatch exception

but it exists in the databse, i can see it stored as an integer.

How can I retrieve rows based on boolean (int) fields

untitled

tcaputi commented 10 years ago

Thank you for bringing that to our attention. That is a bug and I will do my best to have it fixed by the end of tonight. (You are correct however, that booleans must be stored as integers due to the limitations of SQLite.

On Mon, Sep 29, 2014 at 11:48 AM, Brblol notifications@github.com wrote:

After inspecting the database, i saw that boolean variables were stored as interger, this is fine but now I can't retrieve them based on the boolean variable.

dm.find(Movie.class, "isHidden", true) returns column does not exist exception dm.find(Movie.class, "isHidden", 1) returns mismatch exception

but it exists in the databse, i can see it stored as an integer.

How can I retrieve rows based on boolean (int) fields

— Reply to this email directly or view it on GitHub https://github.com/epsilonlabsllc/DataManagement/issues/5.

With all due respect, Thomas Caputi

tcaputi commented 9 years ago

I can't replicate this issue.... can you send me a definition of the class?