|
This
is just an example but not documented.
We
use it to "lazy" load objects from a collection using a set of criteria on the
object itself and on the object that hold the collection (see classes provided
with the CastorJDO example)
OQLQuery oql;
QueryResults results; oql = db.getOQLQuery("SELECT d FROM myapp.ProductGroup as d
where d.products.id = $1 and name like $2");
oql.bind(productId);
oql.bind("Group%"); results = oql.execute(); while (results.hasMore()) { group = (ProductGroup)results.next(); writer.println("GROUP : "+group.getName()); } Note
that we use the collection (d.products) as if it were the object stored in the
collection
Hope
it will help you
========================================================================= Ce message et toutes les pi�ces jointes sont propri�t� de VALTECH et susceptibles de contenir des informations confidentielles � l'intention exclusive de ses destinataires. Si vous avez re�u ce message par erreur ou si celui ci vous est parvenu incomplet ou alt�r�, merci d'en avertir l'exp�diteur par retour.Toute utilisation, diffusion ou publication non express�ment autoris�e par nous par �crit est strictement interdite. -------------------------------------------------------------------------- This message and any attachments are Valtech property and may contain iconfidential information intended solely for the addressees. If your are not the intended recipient of this message or if you have received it uncomplete or altered, please notify the author by replying to his e-mail immediately. Any unauthorised use, diffusion or dissemination not expressly authorised by us in writing is strictly prohibited. ========================================================================= Copyright Valtech 2002 |
- [castor-dev] Request for OQL Query examples VIENNE Christophe
- Erik Gollot
