I'm trying to make a query where I want to check if either the email or name of a user starts with a given string. In a sql query I would write this using
name like 'queryString%' or email like 'queryString%'
In ebean query I would expect to write something like:
find.where().or(like('name', 'queryString%'), like('email', 'queryString%'));
The problem is that the or takes in an expression, not an expressionlist, which is what I get when writing
find.where().like(...,...)
As I understand it doing a query like this:
find.where().like(.., ...).like(..., ...)
is using AND.
How can I write such a query using ebean?
Thanks!