This one time, at band camp, Al Caponi said:

AC>Uniqueness In Generated XML ObjectsHi,
AC>I'm using Castor 0.8.11 and whenever I do a SELECT query with a WHERE IN
AC>LIST clause containing negative Long values (e.g. select obj from MyObject
AC>obj where myUId in list(-10, -20)),
AC>I get the following exception :
AC>
AC>org.exolab.castor.jdo.QueryException: The LIST can only contain literals and
AC>Keywords nil and undefined.
AC> at
AC>org.exolab.castor.jdo.oql.ParseTreeWalker.checkInClauseRightSide(ParseTreeWa
AC>lker.java:683)
AC> at
AC>org.exolab.castor.jdo.oql.ParseTreeWalker.checkWhereClause(ParseTreeWalker.j
AC>ava:520)
AC> at
AC>org.exolab.castor.jdo.oql.ParseTreeWalker.checkWhereClause(ParseTreeWalker.j
AC>ava:524)
AC> at
AC>org.exolab.castor.jdo.oql.ParseTreeWalker.checkErrors(ParseTreeWalker.java:2
AC>29)
AC> at
AC>org.exolab.castor.jdo.oql.ParseTreeWalker.<init>(ParseTreeWalker.java:130)
AC> at org.exolab.castor.jdo.engine.OQLQueryImpl.create(OQLQueryImpl.java:535)
AC>
AC>No such problem with positive numbers.
AC>I know that the Castor version is very old but I can't upgrade it right now.
AC>Any idea of what causes this problem and how to fix/work around it?

Al,

It appears that the MINUS token is not handled in this (and probably
other) switch statement. It appears that a case for the MINUS token
needs to be added to the checkInClauseRightSide() method. But I'm not
sure what else in the OQL layer is affected by this. It will certainly
require some experimenation to ferret this out.

Incidentally, and I know that this doesn't help you out with 0.8.11,
I have a new implementation of the Castor OQL engine that uses
ANTLR. Hopefully I'll be able to add this to the code base soon which
will make adding functionality much, much easier.

Bruce
-- 
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to