Does anybody know if its possible to perform a select in query in OQL?

I'd like to do the following but I get a syntax error
SELECT a from com.xtriahealthcare.organization.Organization a WHERE id IN
(84918,84919,84920)

An incorrect token type was found near , (45, need 26
stack trace: org.exolab.castor.jdo.oql.OQLSyntaxException: An incorrect
token type was found near , (45, need 26
        at org.exolab.castor.jdo.oql.Parser.match(Parser.java:144)
        at org.exolab.castor.jdo.oql.Parser.primaryExpr(Parser.java:633)
        at org.exolab.castor.jdo.oql.Parser.postfixExpr(Parser.java:609)
          etc.


Is there an easy way to do this in Castor?  Basically I've got a map table
that contains the foreign keys.  I do one lookup to get the list of foreign
keys.  Rather then have to loop through each record and perform a load (n +
1 trips to database) I'd like to use a IN query to return all rows/objects
in one trip (2 trips to database)

I tried to use the many to many feature of Castor but wasn't able to get it
to work across all use cases.  So I had to remove the many to many
relationships and deal with the map tables directly.  If I could get the IN
stuff to work that would bring performance back to the respectable range.

Thanks,

Gray Jones

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

Reply via email to