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 broken !
Date Sat, 04 Jan 2003 16:32:29 GMT
On Fri, 2003-01-03 at 12:15, Jakob Braeuchi wrote:
> hi,

hi jacob !

> 
> the query i'm thinking of is the following:
> 
> SELECT DISTINCT A0.KategorieName,A0.Kategorie_Nr,A0.Beschreibung
> FROM
> Kategorien A0
> INNER JOIN Artikel A1 ON A0.Kategorie_Nr=A1.Kategorie_Nr
> INNER JOIN BOOKS A2 ON A0.Kategorie_Nr=A2.Kategorie_Nr
> INNER JOIN CDS A3 ON A0.Kategorie_Nr=A3.Kategorie_Nr
> WHERE
> A1.Kategorie_Nr = 5
> or A2.Kategorie_Nr = 5
> or A3.Kategorie_Nr = 5
> 
> and it seems to work (at least in hsqldb, mysql and sapdb)
> so the only problem i have is how to build this sql ....
> any ideas or help will be appreciated.

I can help you if you want. Right now I'm very busy ( trying to deliver
a product on time ), but in 2 weeks I'll be able to help you ( if you
can way so long :-) )

> 
> jakob
> 
> ----- Original Message -----
> From: "Jakob Braeuchi" <jbraeuchi@gmx.ch>
> To: "OJB Developers List" <ojb-dev@jakarta.apache.org>
> Cc: "OJB Users List" <ojb-user@jakarta.apache.org>
> Sent: Friday, January 03, 2003 3:04 PM
> Subject: extent aware pathExpressions broken !
> 
> 
> > hi all,
> >
> > while playing aoround with extent aware path expressions, i found that the
> > current implementation does not work due to caching of sql statements.
> >
> > i queried for the query i did is :
> >
> > crit.addEqualTo("allArticlesInGroup.productGroupId", new Integer(5));
> > Query q = QueryFactory.newQuery(ProductGroup.class, crit, true);
> >
> > because 'allArticlesInGroup' points to a class with two extents  the 3
> > following queries should have been executed (one for Artikel, Books and
> CDs)
> >
> > SELECT DISTINCT A0.KategorieName,A0.Kategorie_Nr,A0.Beschreibung FROM
> > Kategorien A0 INNER JOIN Artikel A1 ON A0.Kategorie_Nr=A1.Kategorie_Nr
> WHERE
> > A1.Kategorie_Nr = '5'
> >
> > SELECT DISTINCT A0.KategorieName,A0.Kategorie_Nr,A0.Beschreibung FROM
> > Kategorien A0 INNER JOIN Books A1 ON A0.Kategorie_Nr=A1.Kategorie_Nr WHERE
> > A1.Kategorie_Nr = '5'
> >
> > SELECT DISTINCT A0.KategorieName,A0.Kategorie_Nr,A0.Beschreibung FROM
> > Kategorien A0 INNER JOIN CDS A1 ON A0.Kategorie_Nr=A1.Kategorie_Nr WHERE
> > A1.Kategorie_Nr = '5'
> >
> > due to caching of the statement (and manipulation of the original, cached
> > query) the 'Artikel' query is executed 3 times.
> >
> > imo we should look for a better way to support exent aware
> pathExpressions.
> > even if the above mentioned way would work as expected we would have read
> > the same productGroup 3 times although there's only one with id = 5 !.
> >
> > i'm thinking of a solution where we need only ONE sql including all tables
> > of the extents.
> >
> > any ideas ?
> >
> > jakob
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:ojb-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:ojb-dev-help@jakarta.apache.org>
> >
> 
> 
> --
> 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