If the entity is serializable have you try writing it out and read it back to a new object?
On Fri, Jul 27, 2018, 6:05 AM Matthew Broadhead <matthew.broadh...@nbmlaw.co.uk.invalid> wrote: > is there a way to deep clone a JPA object automatically? i.e. to copy > all the parameters and children but clear the id and version fields? > > i saw that it is possible to do em.detach(object); and then reset the id > and version but by the time i have done that i may as well have written > a full copy function. >