I believe that TJDO has a problem where under certain
circumstances it generates sql that is invalid because a
correlation name is used twice in the same statement.
q.declareVariables("CD cd1; CD cd2");
q.setFilter("(cdSet.contains(cd) && cd.title.
startsWith(\"E\")) && (cdSet.contains(cd2) && cd2.title.
My intent is to retrieve Stores that have a cd title
beginning with E _AND_ a cd title that begins with F. If
that seems silly, in our domain context it really does make
sense (we aren't really dealing with CDs and Stores).
The error I get is something like this...
The correlation name 'THIS_CD_SET' is specified multiple
times in a FROM clause.
I believe what has happened in the generated SQL is two
separate inner joins are created that try to use that
same correlation name.
Log in to post a comment.