I have a JPA entity already persisted in the database. I would like to have a copy of it (with a different id), with some fields modified.
What is the easiest wa
I just tried setting the id to null and it worked
address.setId(null); address = addrRepo.save(address);
setting the id to null made it so it saved into a new record with new id since i have it automatically generated.