Hello Florin,

thank you very much for your investigations.
Your information may be very helpful to improve OJB,
and we probabably would not have made such detailed
comparison ourselves.


> -----Original Message-----
> From: Florin Pop [mailto:[EMAIL PROTECTED]

[..]
 
> 1. If I set the attribute auto-retrieve="true" all the loads 
> work slower. If
> I set it to "false" then there is a speed up but when I try 
> to access the
> Collection of the counties I receive NullPointerException. 
> How do I init the
> collection? 

I do not consider the setting auto-retrieve="false" very useful,
because in that case, you have to fill that collection
yourself.

> Is it mandatory to use proxy for County?

I would recommend to use a proxy for the collection. Then the
materialization of the collection is deferred until the application
code accesses it for the first time, but it is done transparently.

You can see how this works in any junit test that uses
org.apache.ojb.broker.ProductGroupWithCollectionProxy,
e.g. org.apache.ojb.broker.ProxyExamples

> 2. In the County class, initially I wanted to have no 
> id_country field, the
> country field contains also an id; But I was unable to map the country
> object without introducing that field. How can I overcome 
> this situation?

There is a new feature called "anonymous key". See
http://db.apache.org/ojb/howto-use-anonymous-keys.html
 
> 3. Once again thank you for your patience.

Thank you for your effort and valuable comparison!

Olli

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

Reply via email to