This one time, at band camp, Enrico Thor said:

ET>does the current status of Castor JDO-OQL support set-construction and
ET>comparison like this:
ET>
ET>"SELECT product FROM foo.Product product WHERE product.categories =
ET>set(cat1, cat2, cat3)" ?
ET>
ET>Object "Product" has a "java.util.Set" of "Category". The corresponding
ET>tables have many-to-many-relationship. I am just starting on OQL but I
ET>think comparisons as the one above are basically supported. From the
ET>castor-documentation I can't figure out, if Castor JDO-OQL (which is
ET>currently in status 3) already supports this. 
ET>
ET>Using oracle as database the statement transfers to:
ET>
ET>[Castor] SELECT "PRODUCT"."ID","PRODUCT_CATEGORY"."CATEGORY_ID" FROM
ET>"PRODUCT_CATEGORY","PRODUCT" WHERE
ET>"PRODUCT"."ID"="PRODUCT_CATEGORY"."PRODUCT_ID"(+) AND
ET>("PRODUCT"."CATEGORY_ID" = set('cat1' , 'cat2' , 'cat3'))
ET>java.sql.SQLException: ORA-00936: Missing Expression
ET>
ET>which implies, that it is not supported but maybe I am using wrong
ET>syntax?

Enrico,

Castor doesn't support comparison of a set but it does support a list. See
the JDO FAQ here:

    http://www.castor.org/jdo-faq.html#OQL

Look for the question, 'Does Castor support the SQL 'IN' expression?'. 

Bruce
-- 
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&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