Hi
When i try to save a detached object, i face issue where mappings get lost but if i make a new object from that object and save, then everything works fine.
Details: I load the object from the DB and now session is closed, i have the detached object and i wanna save a copy of the detached object, so i go ahead and nullify the detached objects and try to save it, so it saves but the many to many mappings are lost but if I make copy of the detached object (detached object - convert to xml using jibx - then again to object using jibx) and save it, it works fine.
Can somebody throw some light? FYI, I am using annotations, so i cant use the unsaved value option to tell hibernate that it's a new object and save it fresh etc.
Thanks Pankaj
|