apache commons beanutils - How to copy objects managed by Hibernate? -


i want copy object (its properties). object managed hibernate , has lazy collections. propertyutils.copyproperties() throws lazy exception.

is there way?

ps: not want unproxy object since don't own (its in jar)

you can call hibernate.initialize() on every lazy collectio of original object before copying. obviously, not work outside of transaction, if yor object detached hibernate session. so, have initialize lazy collections enough.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -