Hello all,
I just started using ORMLite and the QueryBuilder.
Now I am wondering how to concatenate parts of the "where" clause, for example:
QueryBuilder<XXX, Integer> myQB = getResultQB();
// myQB now contains a valid "where" clause
// if I have got an additonal parameter in "myExtra" it should be "anded" to the existing where clause
if (!myExtra.isEmpty())) {
myQB.where()
.and()
.eq("fieldname", myExtra);
}
This leads to an exception:
java.lang.IllegalStateException: Expecting there to be a clause already defined for 'AND' operation
What am I doing wrong ...
Thanks a lot
Thilo Bretschneider
Promo GmbH