spring-data-couchbase icon indicating copy to clipboard operation
spring-data-couchbase copied to clipboard

CouchbasePersistentEntity#isTouchOnRead never used? [DATACOUCH-629]

Open spring-projects-issues opened this issue 5 years ago • 3 comments

David Prevost opened DATACOUCH-629 and commented

I was checking to use the expiry feature and I noticed that we can configure the touchAndRead on Document#touchOnRead.

However, even though it is read by CouchbasePersistentEntity#isTouchOnRead, no one is actually checking if the entity expiry date need to be touchAndRead.

By analysing MappingCouchbaseConverter#writeInternal(), we can see that the expiry is always updated instead of doing it by checking if the touchAndRead is activated... unless this is a feature of JPA then is it probably a bug.

Fortunately for me, I need the expiry to be updated so not a major bug for me...


No further details from DATACOUCH-629

spring-projects-issues avatar Oct 08 '20 13:10 spring-projects-issues

Michael Reiche commented

"By analysing MappingCouchbaseConverter#writeInternal(), we can see that the expiry is always updated instead of doing it by checking if the touchAndRead is activated."

touchOnRead does not affect writes

spring-projects-issues avatar Oct 10 '20 00:10 spring-projects-issues

David Prevost commented

Michael Reiche the fact that the isTouchOnRead is never used is still a problem unless it is fixed by antoher Jira though....

spring-projects-issues avatar Oct 10 '20 02:10 spring-projects-issues

Thanks for your input. Will handle this in https://github.com/spring-projects/spring-data-couchbase/issues/982

mikereiche avatar Aug 14 '21 01:08 mikereiche