This one time, at band camp, Neil Blue said:

NB>I am using castor 0.9.4.1, and I am able to use "SQL CALL..." to query the
NB>database and return an object. But I am unable to do this for objects that
NB>have collection attributes.
NB>
NB>Please could someone tell me the syntax required to query of such an object
NB>with a collection.

Neil,

This may not be possible because the to-many side of the relationship
is not reflected in the database from the parent side. But, on
second thought, if the relationship is bi-directional at the database
level, how about the following:

    ( "CALL SQL select * from child_object_table where child_object_table.parent_id = "
            + parentObject.getId() );

However, I may just be deluded. I'm working on very little sleep
in the past two weeks 8-0.

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