Hi Ivan, indeed sounds like a good idea, would you mind creating a ticket for this? https://issues.apache.org/jira/browse/EMPIREDB
Cheers, Francis On 11 September 2015 at 12:49, Ivan Nemeth <[email protected]> wrote: > Hi, > > if you add an empty constraint list to DBCommand through > addWhereConstraints, the resulting sql will end with an empty WHERE. > > Example: > > DBCommand cmd = db.createCommand(); > cmd.select(TABLE.getColumns()); > cmd.addWhereConstraints(new ArrayList()); > > The generated sql will be something like this: > > "SELECT t0.name FROM table t0 WHERE" > > Since we use dynamically built queries we have to check every time whether > the constraint list is empty. > > I think a check for an empty list either in DBCommand.addWhereConstraint > method or in DBCommand.addWhere(Stringbuffer...) method would solve this > issue. > > Regards, > Ivan >
