Looks like you ran into the same thing I did. The OQL implementation for Castor doesn't look like it supports multiple iteratorDefs within the WHERE clause. The OQL parser is loiong for the WHERE statement and finds a comma which it doesn't handle. Certainly the flexibility of this OQL implementation is greatly limited by this shortcoming. -----Original Message----- From: David Haraburda [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: [castor-dev] OQL Question (Joins) Hi, I am having a problem with an OQL query I am trying to run. It looks like this: SELECT DISTINCT a FROM Apple AS a, Banana AS b WHERE b.aref = a.id AND b.someint >= 10; I know something like this works in SQL.. The error I am getting is an OQLSyntaxException: org.exolab.castor.jdo.oql.OQLSyntaxException: An incorrect token type was found near , (45, need 0 at org.exolab.castor.jdo.oql.Parser.match(Parser.java:144) at org.exolab.castor.jdo.oql.Parser.getParseTree(Parser.java:106) at org.exolab.castor.jdo.engine.OQLQueryImpl.create(OQLQueryImpl.java:267) at org.exolab.castor.jdo.engine.DatabaseImpl.getOQLQuery(DatabaseImpl.java:438) ...complaining about the comma after "Apple AS a". I see that 0 is the token type for END_OF_QUERY, so I am confused why it would be looking for this... Also, can I use the JOIN clause in OQL? It didn't like it when I tried to do an INNER JOIN, is this something I should leave up to the translator? Any help would be appreciated. Thanks, David ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
