Skip to content
Advertisement

Android Room Persistence Library – How to find entities with ids contained in list of ids?

I am trying to do the following query in my DAO.

It gives me this compile-time error:

Both List<String> ids as well as String... ids and Sring[] ids don’t work. However, since I don’t know how many ids I will have in compile-time and therefore, I need a list/array and not varargs.

How can I make this SQL query work?

Advertisement

Answer

You need parentheses:

(and FWIW, I filed an issue to try to get a better error message here)

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement