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/07/23 15:20:05 UTC

prefetchedCollections for collection field in referenced classes?

We have an application with three classes C, P, Q.
C has a collection ps of P, and P has a collection qs of Q.

This way, each C instance is the root of a three level tree.

In some cases, we would like to read several such trees with
the least possible number of SQL statements.

We use non-proxied collections throughout, and besides 
  queryByCrit.addPrefetchedCollections("ps")

This reduces the number of queries needed to fill
the ps collection fields by using a clever SQL statement
to fetch the data for several ps instances.

But still the qs collection fields are each 
filled with a single query.

It would be nice to have something like

  queryByCrit.addPrefetchedCollections("ps.qs")

to advice the SQLGenerator to do that trick for
the innner collections, too.

Can something like that be implemented?

Olli

-- 
  Dr. Oliver Matz
  ppi Media GmbH
  Deliusstraße 10
  D-24114 Kiel
  phone	+49 (0) 43 1-53 53-422
  fax     	+49 (0) 43 1-53 53-2 22
  email	mailto:oliver.matz@ppi.de
  web	www.ppi.de


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org