Hello,

> -----Original Message-----
> From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to