How would you do this same query through the ODMG API? Thanks, Daniel.
----- Original Message ----- From: "Gelhar, Wallace Joseph" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 4:09 PM Subject: RE: Simple (I Hope) Howto Question Hi Gary, This will execute a joined query similar to: SELECT A0.* FROM Person A0 INNER JOIN Email A1 ON A0.EmailID = A1.EmailID WHERE A0.name = X AND A1.address = Y So, yes, it will check all "addresses inside emails". And if emails is null, it will return an empty collection. Hope this helps, Wally -----Original Message----- From: Gary [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 9:52 AM To: OJB Users List Subject: RE: Simple (I Hope) Howto Question Thanks. Will this check all the "address"es inside "emails?" Or just the first? Or... And what if emails is null? Thanks again, Gary --- [EMAIL PROTECTED] wrote: > > -----Original Message----- > > From: Gary [mailto:[EMAIL PROTECTED] > > > I have a Person object that contains a list of 0-n > > Email objects and a name. > > > > I would like to do a PB query (not OQL) to the > effect > > of: > > Give me all Persons with name like X and email > like Y. > > I suppose Person has a field name of type String > and a field emails of type Collection (of Email), > and Email has a field address of type String. > > Then what about: > > Criteria crit = new Criteria(); > crit.addLike("name", x); > crit.addLike("emails.address", y) > Query qry = new QueryByCriteria(Person.class, crit); > > HTH, > Olli > > -- > Oliver Matz > ppi Media GmbH > Deliusstra?e 10 > D-24114 Kiel > phone +49 (0) 43 1-53 53-422 > fax +49 (0) 43 1-53 53-2 22 > email mailto:[EMAIL PROTECTED] > web www.ppi.de > > Explore your printnet! > > DRUPA 2004 > Dusseldorf, Germany, 6 - 19 May 2004, Booth 6E62 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
