Hmm, here's the generated code for my UserFullVO (has 1:N to Phone):
public void clearPhoness()
{
this.Phoness.clear();
}
...
public void cleanPhones(){
this.addedPhoness = new java.util.ArrayList();
this.removedPhoness = new java.util.ArrayList();
this.updatedPhoness = new java.util.ArrayList();
}
Note: I have aggregate-name="Phones" instead of "Phone". CleanPhones
does what you said -- basically a "commit" of the VOs after pushing the
changes into the EJBs. Perhaps a new method should be generated:
removeAllPhones() that puts all of the PhoneVOs into the removedPhones
Collection, ensuring there are no duplicates of course.
Again, we are not using value objects in our project (I created a
DataTransferObject and DTOTree that do pretty much the same thing), so I
wouldn't be able to test it out if I added it.
David Harkness
Sony Pictures Digital Networks
-----Original Message-----
From: Ingo Bruell [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 1:29 AM
To: [EMAIL PROTECTED]
Subject: RE: [Xdoclet-user] updating a m-m value object?
Hi,
> I'm curious if the person who wrote the value object code is aware of
> this issue and what the intention of clearFoos() is. If it's intended
> to remove all the related objects, clearly this is a bug. If it had
> some other use, what was it?
The clear method just clears the Collections in which added and deleted
relations are stored.
These Collection are used in the CMP classes to add or update or delete
the relations.
--
best regards
Ingo Bruell
--
<[EMAIL PROTECTED]>
<ICQ# 40377720>
Oldenburg PGP-Fingerprint: CB01 AE12 B359 87C4 BF1C 953C 8FE7 C648
169E E5FC
Germany PGP-Public-Key available at pgpkeys.mit.edu
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user