Commit e1e8147e authored by Matija Obreza's avatar Matija Obreza

Fixed the extra OR in generated filter query

parent 2d5a53e6
...@@ -238,10 +238,11 @@ public class DirectMysqlQuery { ...@@ -238,10 +238,11 @@ public class DirectMysqlQuery {
sb.append(" OR "); sb.append(" OR ");
} }
handledCount += handleNullValues(sb, dbName, fieldQuery.elements(), params); int handledCountNull = handleNullValues(sb, dbName, fieldQuery.elements(), params);
handledCount += handledCountNull;
// do we have more? // do we have more?
if (handledCount > 0 && fieldQuery.size() > handledCount) { if (handledCountNull > 0 && handledCount > 0 && fieldQuery.size() > handledCount) {
sb.append(" OR "); sb.append(" OR ");
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment