Check empty SQLWhereChain
This commit is contained in:
parent
14da2611c0
commit
ccaf9bf26c
@ -23,6 +23,10 @@ public class SQLWhereChain extends SQLWhere {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Pair<String, List<Object>> toSQL() throws ORMException {
|
public Pair<String, List<Object>> toSQL() throws ORMException {
|
||||||
|
if (conditions.isEmpty()) {
|
||||||
|
throw new ORMException("SQLWhereChain needs at least one element inside !");
|
||||||
|
}
|
||||||
|
|
||||||
String sql = "";
|
String sql = "";
|
||||||
List<Object> params = new ArrayList<>();
|
List<Object> params = new ArrayList<>();
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user