Define a OQLQuery with this select statement:
select d from mypackage.Dataobject d where d.ebatch = $1 and d.status = $2
Then call the bind method with your given ebatch object and then call it with a string object containing 'BBB'.
Afterwards execute the query.
Kind regards Rainer
Hess Yvan schrieb:
Hi,
I have a class with one-to-many relation: ebatch ----> dataobject (with ebatch containing a collection of dataobject).
I would like to retrieve an given ebatch and only a subset of dataobject linked to it, having for example a given status.
Here is the situation:
relation is: ---------- 1 n ------------- -- ebatch ----> dataobject -- --------------------------------
database entry are
--------------------------------------------
-- ebatch dataobject -- oid oid ebacthoid status
--------------------------------------------
-- 10 1 10 AAA
-- 2 10 AAA
-- 3 10 BBB
-- 4 10 BBB
--------------------------------------------
What is the OQL query to retrieve ebatch:10 with a dataObject collection having only [(3,10,BBB),(4,10,BBB)]
Thanks for your answer.
Yvan Hess
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-- Institut fuer Seeverkehrswirtschaft und Logistik http://www.isl.org/ Dipl.-Inf. Rainer Mueller mailto:[EMAIL PROTECTED] Universitaetsallee GW1 Block A tel:+49 421 22096-65 D-28359 Bremen fax:+49 421 22096-55
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
