Could you use <java>if(!cds.getCascadeStore()) continue;</java>
to solve your problem ?

On Mon, 2004-03-08 at 10:44, Edson Carlos Ericksson Richter wrote:
> 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
-- 
Leandro Rodrigo Saad Cruz
InterBusiness Tecnologia e Servi�os
OJB - db.apache.org/ojb
XINGU - xingu.sf.net


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

Reply via email to