android - ActiveAndroid returns always empty results -


i tried add activeandroid first android app. no errors far, items being saved (i checked sqlite manager) no matter query use result empty. have 1 model (todo) , strings, booleans , 1 date saved. (see below)

i use android 6.0 sdk 23 genymotion emulator , activeandroid 3.0.

what tried:

  • arraylist<model> list = model.all(todo.class);
  • arraylist<model> list = new select().from(todo.class).execute();
  • todo item = return new select().from(todo.class).where("id = ?", 1).executesingle();
  • ...

the size of lists 0 , item (when searching 1 item) null. no errors.

any ideas?

here model:

package xyz.tdoo.model;  import *   @table(name = "todos") public class todo extends model {     @column(name = "name")     public string name;      @column(name = "description")     public string description;      @column(name = "done")     public boolean isdone = false;      @column(name = "favourite")     public boolean isfavourite = false;      @column(name = "duedate")     public date duedate;      public todo(string name) {         super();         this.name = name;     }      public static arraylist<todo> findall() {         return new select().from(todo.class).execute();     }      public static todo findone(int id){         return new select().from(todo.class).where("id = ?", id).executesingle();     } } 

i ended using sugarorm. fits simple needs , worked beginning. found out activeandroid bit old , not maintained more.


Comments