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
> D�sseldorf, 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]

Reply via email to