-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
To easily reproduce, modify com.redis.om.spring.annotations.document.fixtures.Company
to add a Spring @Version
annotation like so:
@Version
Long version;
then run your existing test com.redis.om.spring.annotations.document.BasicRedisDocumentMappingTest:testAuditAnnotations()
and observe the following error:
org.springframework.dao.DuplicateKeyException: Cannot insert existing object with id 01G5MB6GH63J2JKTWEZXN6J5WC!. Please use update.
It seems your implementation of CRUD repository is not updating the version field therefore causing the spring method deciding wether an object isNew
to treat current as new since version = null.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request