Check empty SQLWhereChain

This commit is contained in:
Marc Baloup 2019-12-01 23:39:19 +01:00
parent 14da2611c0
commit ccaf9bf26c
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,10 @@ public class SQLWhereChain extends SQLWhere {
@Override
public Pair<String, List<Object>> toSQL() throws ORMException {
if (conditions.isEmpty()) {
throw new ORMException("SQLWhereChain needs at least one element inside !");
}
String sql = "";
List<Object> params = new ArrayList<>();
boolean first = true;