Hi Olli,
Thanks for the tip. The collection-class attribute indeed lets me specify
the ManagableCollection implementation to use. After checking this out,
however, it seems I only have the choice between (a) a
RemovalAwareCollection, which will delete the removed child objects, or
(b) a ManagableArrayList (or -Vector), which will just do nothing when a
child object is removed. I guess what I would like it to do, is to set the
FK reference in the child to null, as it is not associated with a parent
any more. I see that I can easily write my own ManagableCollection
implementation that does that for me, but I wonder whether this problem
isn't common enough to justify a more general solution?
Cheers,
Gerhard Grosse
[EMAIL PROTECTED]
18.08.2003 11:55
Bitte antworten an "OJB Users List"
An: [EMAIL PROTECTED]
Kopie:
Thema: RE: How to avoid 'RemovalAwareCollection' in 1:N mappings
Hello Gerhard,
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> the parent object to hold the child objects. Now it seems
> that OJB always
> assigns a RemovalAwareCollection to my collection attributes.
> How can I
> avoid this?
add attribute
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList
"
to the respective collection-descriptor.
HTH,
Olli
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]