Search code examples
spring-bootspring-data-jpacouchbasespring-data-couchbasecouchbase-java-api

Spring Data for Couchbase - Metadata Information


I am new using Spring Data for Couchbase, I defined this object

public class Building {

    @NotNull
    @Id
    private String id;

    @NotNull
    @Field
    private String name;

    @NotNull
    @Field
    private String companyId;
}

but I am not sure if the id defined in the object will be the same of the Couchbase Metadata Information and how to define the format of it

.cas
.expiration
.flags
.id
.type

Solution

  • You don't need to worry about the meta attributes, they are automatically created by couchbase. Just the @Id is mandatory.