You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Akmal Sarhan <ak...@hotmail.com> on 2002/11/25 19:47:25 UTC

copyInto() problem


copyInto():
having two tables one called COMPANY and the other called CUSTOMER with a 
one-to-many relation.The generated OM class of
COMPANY would have a method called addCustomer().

now I want to make a copy of COMPANY through the generated copy() method.
what happens in this method(after debugging)is that all the setXXX() of the 
COMPANY will be invoked on a new COMPANY(the copy) (including the setting of 
the primaryKey
which in turn results in retrieving all the original CUSTOMER's of COMPANY) 
then an iteration happens on the CUSTOMER's(of the original COMPANY)
adding copies to the new COMPANY(the copy)
at the end the new COMPANY will have both the original CUSTOMER's + copies 
of these CUSTOMER's (i.e duplication)

If I am missing something, please tell me what is going wrong in the copy() 
method

regards
Akmal



_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>