jeudi 24 septembre 2015

SugarORM findWithQuery and WHERE IN

I'm working on an android app that uses sugarORM. I want to get a multiple items that match the ids in a list.

However when i call

findWithQuery(A.class, "SELECT * FROM <table> WHERE <column> in (?)", "1,2,3") 

I always get an empty list(although I double checked the query with SQLite DB Browser and it worked).

Splitting this query into multiple findById seems inefficient. Any thoughts on getting WHERE IN to work using SugarORM?

Aucun commentaire:

Enregistrer un commentaire