Thanks for your quick reply.
You can do this easier by doing:
for (Map.Entry<String, List<String>> entry : whereFilter.entrySet()) {
w.in(entry.getKey(), entry.getValue());
}
w.and(whereFilter.size());
Nice trick. I used that, though still no luck.
The query I pasted is the one created. By debugging I took it from the PreparedQuery object. Anyway I also did the 'setprop' thing to dump everything to the logcat and got the same query. These are the related log lines. The id's I used in the previous example were just for the sake of the explanation, these down here are the real id's (not relevant, though):
---
05-24 21:08:02.494: D/StatementBuilder(7544): built statement SELECT * FROM `translations` WHERE (`lang` IN ('es' ) AND `stringid` IN (178 ,180 ,181 ,182 ,183 ,184 ) )
05-24 21:08:02.504: D/BaseMappedStatement(7544): prepared statement 'SELECT * FROM `translations` WHERE (`lang` IN ('es' ) AND `stringid` IN (178 ,180 ,181 ,182 ,183 ,184 ) ) ' with 0 args
05-24 21:08:02.504: D/SelectIterator(7544): starting iterator @1156898120 for 'SELECT * FROM `translations` WHERE (`lang` IN ('es' ) AND `stringid` IN (178 ,180 ,181 ,182 ,183 ,184 ) ) '
05-24 21:08:02.514: D/SelectIterator(7544): closed iterator @1156898120 after 1 rows
05-24 21:08:02.514: D/StatementExecutor(7544): query of 'SELECT * FROM `translations` WHERE (`lang` IN ('es' ) AND `stringid` IN (178 ,180 ,181 ,182 ,183 ,184 ) ) ' returned 1 results
---
You've done this query and it produces more than 1 result? Can you show your database?
I run this query in a sqlite db editor and it returned all rows (using the real id's from above there are 6 rows). ORMLite still returns just one.
Oh, right. I had modified the code to use "IN" instead of AND and OR and left that part in the message. Sorry for the confusion.