I have a model class that has an id per record. And I have a list of id's that I want to search from that table.
Do I need to build a SQL statement dynamically and pass it to the Finder object or is there a better way of doing it?
I have a model class that has an id per record. And I have a list of id's that I want to search from that table.
Do I need to build a SQL statement dynamically and pass it to the Finder object or is there a better way of doing it?
Try to build a query using
Expr.in(String propertyName, Collection<?> values)
Other options are :
Expr.in(String propertyName, Object[] values)
orExpr.in(String propertyName, Query<?> subQuery)
API reference.