ivoa / vo-dml

VO-DML tooling and documents.
Creative Commons Attribution Share Alike 4.0 International
1 stars 1 forks source link

create a function to reset dbIds #31

Open pahjbo opened 6 months ago

pahjbo commented 6 months ago

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.