I think it is possibly due to the last .and() added in for cycle... But it has stop working in this latest version upgrade.
I'm not 100% sure why it was working at all under 4.47 but 4.48 added some features in the .and()
chaining department so maybe now it is better checking for this error. Right now you have dangling .and()
statements.
Instead of putting the .and()
at the end of your lines, you should move them to the start of the lines. Right now, if whereFields
is null
then you would build a query with the following:
where.eq(Intervento.ESEGUITO_FIELD_NAME, false).and();
where.eq(Intervento.ENABLED_FIELD_NAME, true).and();
If ORMLite actually generated the SQL this would be something like:
WHERE eseguito = false AND enabled = true AND
Notice the dangling AND
at the end of the query which is invalid. If you put the .and()
when before you add another SQL clause, then this would not be an issue.
where.eq(Intervento.ESEGUITO_FIELD_NAME, false); // no .and() here
// .and() at the start of a new clause
where.and().eq(Intervento.ENABLED_FIELD_NAME, true);
Then inside the whereFields != null
and the loop you would do something like:
where.and().like(key,selectArg);
So you would add the AND key like ?
each time there is another key.