Hibernate/JPA doesn’t support Instant as a type for @Version. Instead, use int, long or (if you prefer a timestamp-based approach) Java.sql.Timestamp
Hibernate expects numeric values (int or long) for optimistic locking, as it automatically increments the version on update.
Instant may introduce precision issues or be handled differently by the database, leading to unexpected errors.
If a timestamp-based approach is required, java.sql.Timestamp is a better alternative.
I recommend to discover:
SPRING JPA LOCK: <https://stackoverflow.com/questions/35523428/spring-jpa-lock%5C%5C>?
@Version in SPRING JPA: <https://medium.com/@AlexanderObregon/leveraging-springs-version-for-optimistic-locking-in-jpa-bf4126ebc438%5C>?