vendredi 25 septembre 2015

ActiveAndroid select all from class

I want to make the simplest query but can't find anywhere online how to do it in active android.

I have an Items table that I simply want to get all items for but my query is only 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 is always whatever the last item I saved was. How can I get all of the items in the table?

Aucun commentaire:

Enregistrer un commentaire