android - ActiveAndroid select all from class -


i want make simplest query can't find anywhere online how in active android.

i have items table want items query returning me one.

 items1.name = "item1";  items2.name = "item2";  items1.save();  items2.save();   list<item> queryresults = new select().from(item.class).execute();  atodoadapter = new itemadapter(this, (arraylist<item>) queryresults); 

my result list whatever last item saved was. how can of items in table?

i had same problem , solved this:

return new select()       .all()       .from(item.class)       .execute(); 

this return items items class.


Comments