I'm trying to implement clone() method for my domain objects using normal Java reflection and Hibernate's metadata API. (I remember that I've read from the forum someone from the Hibernate team saying that people have done the same thing) My goal is to implement the cloning in the base class of my domain objects in a way that I shouldn't have to care about it in the extending classes. Has anyone succeeded in doing this? It seems to get quite involved especially when cloning Collections. Any pointers to examples, articles or documentations concerning this are highly appreciated!
Sincerely,
Jouni Hartikainen
|