Skip to content

Commit

Permalink
leave some of test version and expiration fields as Integer as long f…
Browse files Browse the repository at this point in the history
…or illustration
  • Loading branch information
agrgr committed Jun 20, 2024
1 parent 3f6c383 commit 57a2b58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/main/asciidoc/reference/aerospike-object-mapping.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The MappingAerospikeConverter can use metadata to drive the mapping of objects t

* `@Id` - applied at the field level to mark the field used for identity purposes.
* `@Field` - applied at the field level, describes the name of the field as it will be represented in the AerospikeDB BSON document thus allowing the name to be different from the field name of the class.
* `@Version` - applied at the field level to mark record modification count. Must be effectively not larger than integer.
* `@Version` - applied at the field level to mark record modification count. The value must be effectively integer.

In Spring Data Aerospike, documents come in two forms – non-versioned and versioned.
Documents with an `@Version` annotation have a version field populated by the corresponding record’s generation count. Version can be passed to a constructor or not (in that case it stays equal to zero).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static class DocumentExampleIdClass {
DocumentExample id;
long counter;
@Version
int version; // must be integer
int version; // the value must be effectively integer
@Field("update")
Long timestamp;
}
Expand Down Expand Up @@ -564,7 +564,7 @@ public static class idAndAddressesList {
public static class VersionedClass {

@Version
private int version; // must be integer
private int version; // the value must be effectively integer
private String field;
@Id
private String id;
Expand All @@ -590,7 +590,7 @@ public static class VersionedClassWithAllArgsConstructor {
@Id
private String id;
@Version
private int version; // must be integer
private int version; // the value must be effectively integer

@PersistenceCreator
public VersionedClassWithAllArgsConstructor(String id, String field, int version) {
Expand Down Expand Up @@ -722,7 +722,7 @@ public static class DocumentWithTouchOnRead {
private int field;

@Version
private int version; // must be integer
private int version; // the value must be effectively integer

public DocumentWithTouchOnRead(String id) {
this(id, 0);
Expand All @@ -744,7 +744,7 @@ public static class DocumentWithExpirationAnnotation {
private String id;

@Expiration
private Integer expiration;
private Integer expiration; // the value must be effectively integer
}

@Value
Expand All @@ -755,7 +755,7 @@ public static class DocumentWithExpirationAnnotationAndPersistenceConstructor {
String id;

@Expiration
int expiration;
int expiration; // the value must be effectively integer

@PersistenceCreator
public DocumentWithExpirationAnnotationAndPersistenceConstructor(String id, int expiration) {
Expand Down Expand Up @@ -831,7 +831,7 @@ public static class DocumentWithExpirationOneDay {
@Id
private String id;
@Version
private int version; // must be integer
private long version; // the value must be effectively integer

@PersistenceCreator
public DocumentWithExpirationOneDay(String id) {
Expand All @@ -847,7 +847,7 @@ public static class DocumentWithTouchOnReadAndExpirationProperty {
@Id
private String id;
@Expiration
private int expiration;
private int expiration; // the value must be effectively integer
}

@Document(collection = DocumentWithExpressionInCollection.COLLECTION_PREFIX + "${setSuffix}")
Expand Down Expand Up @@ -901,7 +901,7 @@ public static class DocumentWithBigIntegerAndNestedArray {
public static class ObjectWithIntegerArray {

@Version
private int version; // must be integer
private Integer version; // the value must be effectively integer
Integer[] array;

public ObjectWithIntegerArray(Integer[] array) {
Expand Down

0 comments on commit 57a2b58

Please sign in to comment.