Yes, I think so (I've patched my local OJB cvs sources to do this already), but I did
like to see this merged into main sources (if is possible). This is the reason I've
asked for this (btw, this is the second time I ask for).
Thanks,
Edson Richter
----- Original Message -----
From: Leandro Rodrigo Saad Cruz
To: OJB Users List
Sent: Monday, March 08, 2004 11:00 AM
Subject: Re: Dinamic collection creation
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]
---
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