i guess the best practice would be to overwrite __clone() and unset the id :-)
I have a case where the cloning itsself has some logic, so i have a method "makeCopy($arg1, $arg2, ..)" and a private function __clone(), which is called inside the makeCopy. Feels very best practice to me :-) greets, Benjamin On Thursday 27 August 2009 06:31:00 pm Peter Hopfgartner wrote: > Dear list members, > > I would like to load an object from the database, clone it and save the > two instances to the database again. Since the 2 objects have the same > identifier, the clash. Is there a kind ok "best practice" for handling > such a problem? > > Regards, > > Peter > > -- > > Dott. Peter Hopfgartner > > R3 GIS Srl - GmbH > Via Johann Kravogl-Str. 2 > I-39012 Meran/Merano (BZ) > Email: peter.hopfgart...@r3-gis.com > Tel. : +39 0473 494949 > Fax : +39 0473 069902 > www : http://www.r3-gis.com -- Benjamin Eberlei http://www.beberlei.de -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components