Actually, how to make a request to get values ​​greater than zero, I try this, but crashes with an error

List<Database> listPhrase = Database.find(Database.class, "countFavourites = ?", ">0"); 
  • For your reference ORM comparison for android - zTrap
  • Thanks, I read it. I do not think that on 1000 lines the difference in speed will be noticeable. And for ease of use there is a difference. - Maxim Fomichev

1 answer 1

Maybe so?

 List<Database> listPhrase = Database.find(Database.class, "countFavourites > ?", "0"); 
  • no, crashes android.database.sqlite.SQLiteException: no such column: countFavourites (code 1): , while compiling: SELECT * FROM PHRASEBOOK_DATABASE WHERE countFavourites > ? - Maxim Fomichev
  • one
    I found the problem. The answer I found here was to name the column through the underscore like this List<Database> listPhrase = Database.find(Database.class, "count_Favourites > ?", "0"); - Maxim Fomichev