hi roland,

you can also use a proxied reference.
i'd prefer using proxied collections and proxied references instead of proxied classes.
the worst thing you can do is mixing both concepts :(


hth
jakob


Roland Carlsson wrote:


I just wanna add that you can use a collectionProxy. Read about it in the
"Advanced O/R" on the homepage of ojb. It will only use one query to
materialize you collection of objects.

Regards
Roland Carlsson

----- Original Message ----- From: "Jakob Braeuchi" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Friday, September 26, 2003 5:47 PM
Subject: Re: Question Proxy





hi joerg,

well this works as designed.
if the class in non proxied the select immediately materializes the
fetched rows.
if the class is proxied only the identities are built and wrapped by a
proxy. the first time you access a method of the proxy it materializes
the real object resulting in a select with primary keys.
in your case the first sql is to select the primary keys (ojb always
select all rows not pk only) and the other 95 are for materialization.

hth
jakob

Joerg Lensing wrote:



Hi All,
I compared the p6Spy-statements of proxied and non-proxied classes.
The class (userPO)
is 1) dynamic proxy  and
  2) no proxy

I queried this class directly  (s.b)
      Query query = new QueryByCriteria(UserPO.class, null);
      Collection result = broker.getCollectionByQuery(query);

The "dynamic proxy" produces 96 select-statements - the non-proxy only
ONE!
Can someone explain me this? (see zip-File for the sql.log)

tx joerg


------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to