Skip to content

Auditing does not work for Couchbase records #2152

Description

@kaliy

Auditing fields are not saved for Couchbase entities declared as Java records.

For example:

@Document
record AuditedRecord(
        @Id String id,
        @CreatedDate Instant createdDate,
        @LastModifiedDate Instant lastModifiedDate) {}

When saving a new record with Couchbase auditing enabled:

var saved = repository.save(new AuditedRecord(null, null, null));

the record read back from Couchbase has null audit fields:

var found = repository.findById(saved.id()).orElseThrow();

assertThat(found.createdDate()).isNotNull(); // fails
assertThat(found.lastModifiedDate()).isNotNull(); // fails 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions