empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Nemeth (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Commented] (EMPIREDB-226) Empire generates incorrect SQL when DBCommand's where list is empty
Date Fri, 11 Sep 2015 12:55:45 GMT

    [ https://issues.apache.org/jira/browse/EMPIREDB-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14740736#comment-14740736
] 

Ivan Nemeth commented on EMPIREDB-226:
--------------------------------------

Thanks, Rainer, just one note. There is a method (I've never used it) DBCommand.removeWhereConstraintOn(...),
which modifies the elements of the where field. So in special cases it can totally clear the
where constraint list and the same problem arise (empty where list). My original suggestion
was a modification not in addWhereConstraints, but in the addWhere method (and in every method
where the 'where' constraints are appended to the sql, for example getDelete).
As I've mentioned I've never used removeWhereConstraintOn(...), so I don't know if this is
a real issue.

> Empire generates incorrect SQL when DBCommand's where list is empty
> -------------------------------------------------------------------
>
>                 Key: EMPIREDB-226
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-226
>             Project: Empire-DB
>          Issue Type: Bug
>            Reporter: Ivan Nemeth
>            Assignee: Rainer Döbele
>            Priority: Minor
>
> 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"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message