mardi 26 mai 2015

ActiveAndroid 'IN' clause

I am developing an android app which works with the ActiveAndroid ORM.

I am looking for a simple query to get the list of Models from a list of ids. but I couldn't find the solution.

With a field List<Long> ids, how can I get my List<MyModel.cass>.

I tried, without success.

String concatIds = "(1,2,3,4)";
new Select().from(MyModel.class).where("Id in ?",concatIds).execute();

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire