db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leandro Rodrigo Saad Cruz <lean...@ibnetwork.com.br>
Subject Re: extent aware pathExpressions fixed
Date Mon, 20 Jan 2003 12:14:09 GMT
On Sun, 2003-01-19 at 09:59, Jakob Braeuchi wrote:
> hi all,
> 
> ojb now provides better support for extent aware path expression. only 
> one sql is executed.
> the sql containins one 'outer join' for each extent and one 'or' for 
> each criteria:
> 
> SELECT DISTINCT A0.KategorieName,A0.Kategorie_Nr,A0.Beschreibung FROM
> Kategorien A0
> LEFT OUTER JOIN Artikel A1 ON A0.Kategorie_Nr=A1.Kategorie_Nr
> LEFT OUTER JOIN BOOKS A1E0 ON A0.Kategorie_Nr=A1E0.Kategorie_Nr
> LEFT OUTER JOIN CDS A1E1 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr
> WHERE
> A1.Artikelname LIKE  'F%'  OR
> A1E0.Artikelname LIKE  'F%'  OR
> A1E1.Artikelname LIKE  'F%'
> 
> this sql returns all productgroups having an article named 'F%' (article 
> has extents Books and CDs). above statement is produced by the following 
> simple query:
> 
>         Criteria crit = new Criteria();
>         crit.addLike("allArticlesInGroup.articleName", "F%");
> 
>         Query q = QueryFactory.newQuery(ProductGroup.class, crit, true);
>         Iterator iter = broker.getIteratorByQuery(q);
> 
> there are some issues with FieldCriteria (criteria referencing another 
> field of a class) because the referenced field may also be extent aware.

Nice work :-)

> 
> jakob
> 
> >  
> >
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ojb-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ojb-dev-help@jakarta.apache.org>
> 
> 
-- 
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://jakarta.apache.org/ojb


Mime
View raw message