79773539

Date: 2025-09-24 09:50:22
Score: 0.5
Natty:
Report link

If the purpose of you locking is to prevent double INSERT, JPA is already doing it for you. You can just use .save() as below and it will do an update if the object has already been persisted.

repository.save(object);

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Imaduddin