Hi!

I'm using a bit modified OJB to get dynamic collections working. The problem is that I 
have a collection dynamically put that doesn't exists in the real bean. When I ask for 
store the main object, OJB tries to atore the collection as well (what is expected if 
the field in main bean really exists - and this is not my case as the collection was 
dynamically created for quering purposes only).

The problem appear be in the storeCollections method:

        Iterator i = listCds.iterator();

        while (i.hasNext())
        {
            CollectionDescriptor cds = (CollectionDescriptor) i.next();
            Object col = cds.getPersistentField().get(obj);
            Collection currentMtoNKeys = null;

As you can see, the call to cds.getPersistentField() occur even the collection 
descriptor is assing to "update=false" (throwing an exception since the persistent 
field don't exists in the bean). I think it's a wrong behaviour. Testing if the 
cds.getCascadeStore() before calling getPersistentField() could improve performance 
and solve undesired behaviour.

What do you all think?

Best regards,

Edson Richter


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.614 / Virus Database: 393 - Release Date: 5/3/2004

Reply via email to