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 ol...@ppi.de on 2003/08/19 10:15:03 UTC
RE: Question re prefetched relationsbips
Hello,
> -----Original Message-----
> From: Jakob Braeuchi [mailto:jbraeuchi@gmx.ch]
> prefetching currently works only for one level . the prefetcher looks
> for a relationship named
>
> "allb.singlec" in A.class in your sample. the query criteria
> has no effect on prefetching.
> i'm not sure whether deep prefetching is really useful.
Such a feature would really make me happy. What do you think,
is it difficult to implement? Are there other people
having that need?
Olli
> >Does anyone know if prefetched relationships can reach more
> than one "layer"
> >of references/collections from an class being queried?
> >E.g. If I have a class A that I an querying and it has a 1:m
> relationship
> >with some class B, with the relationship defined by the name "allb",
> >and then each B has 1 1:1 relationsbip with another class C, with the
> >relationship called "singlec", is the following supposed to work:
> >
> > Criteria criteria = new Criteria();
> > // configure the criteria
> > ...
> >
> > // add prefetched relationships
> > criteria.addPrefetchedRelationship("allb");
> > criteria.addPrefetchedRelationship("allb.singlec");
> >
> > Query q = QueryFactory.newQuery( A.class, criteria);
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org