There can be times when it is necessary to reset the db Ids of an existing object - e.g. when wanting to create a new db entry with
JPA persist
The current workaround is to use the copy constructor (which is deep and respects references) however this is inefficient in both memory and time in the cases where the original object is no longer needed.
There can be times when it is necessary to reset the db Ids of an existing object - e.g. when wanting to create a new db entry with JPA persist
The current workaround is to use the copy constructor (which is deep and respects references) however this is inefficient in both memory and time in the cases where the original object is no longer needed.