SSSS wrote:
Is copy functionality supported by Hibernate?
Suppose I have User, Role tables and the relation between them is many-to-many. I want to copy a User with the method
copyUser(Long userId);
This method is supposed to create a new User record with all the attributes of the passed userId. That should also copy the associations in the other tables also. ie the new user should get all the roles that the source user from which new user has been created.
Hope I am clear..Is it directly supported by Hibernate?
Thanks,
SSSS.
"beanlib" should solve this cloning problem for you:
http://hansonchar.blogspot.com/2005/06/ ... rnate.html