You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br> on 2003/05/13 17:30:52 UTC

[FYI] more than one hint class for path expression

Hi all. You can now use more than one hint class for path expressions.
Example.

<java>

Criteria crit = new Criteria();
crit.addEqualTo("path.field",someValue);
QueryByCriteria query = new QueryByCriteria(Clazz.class,crit);
query.addPathClass(HintAbstractClass.class);
query.addPathClass(HintOne.class);
query.addPathClass(HintTwo.class);

Collection result = broker.getCollectionByQuery(query);

</java>

The code above retrieves a List of Clazz objects that have an
aggregation to HintAbstractClass denoted by path. Only subclasses
HintOne and HintTwo will be used onto  the join .

HintOne and HintTwo must be part of the HintAbstractClass extent.

If no path class is provided all extent classes will be used on the
join.

-- 
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://jakarta.apache.org/ojb