Skip to content

Commit 5044123

Browse files
committed
Merge branch 'plugin-21-id-drop-not-null' into 'dev'
MyObjectBox: drop PropertyFlags.NOT_NULL for ID properties. See merge request objectbox/objectbox-java!28
2 parents 1cd25fa + 00a771b commit 5044123

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/objectbox-java-test/src/main/java/io/objectbox/index/model/MyObjectBox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private static byte[] getModel() {
5050
entityBuilder = modelBuilder.entity("EntityLongIndex");
5151
entityBuilder.id(7, 3183490968395198467L).lastPropertyId(7, 4606523800036319028L);
5252
entityBuilder.property("_id", PropertyType.Long).id(7, 4606523800036319028L)
53-
.flags(PropertyFlags.ID | PropertyFlags.ID_SELF_ASSIGNABLE | PropertyFlags.NOT_NULL);
53+
.flags(PropertyFlags.ID | PropertyFlags.ID_SELF_ASSIGNABLE);
5454
entityBuilder.property("indexedLong", PropertyType.Long).id(1, 4720210528670921467L)
5555
.flags(PropertyFlags.NOT_NULL | PropertyFlags.INDEXED).indexId(4, 3512264863194799103L);
5656
entityBuilder.property("float1", PropertyType.Float).id(2, 26653300209568714L)

tests/objectbox-java-test/src/main/java/io/objectbox/relation/MyObjectBox.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private static byte[] getModel() {
5151
entityBuilder = modelBuilder.entity("Customer");
5252
entityBuilder.id(1, 8247662514375611729L).lastPropertyId(2, 7412962174183812632L);
5353
entityBuilder.property("_id", PropertyType.Long).id(1, 1888039726372206411L)
54-
.flags(PropertyFlags.ID | PropertyFlags.NOT_NULL | PropertyFlags.ID_SELF_ASSIGNABLE);
54+
.flags(PropertyFlags.ID | PropertyFlags.ID_SELF_ASSIGNABLE);
5555
entityBuilder.property("name", PropertyType.String).id(2, 7412962174183812632L)
5656
.flags(PropertyFlags.INDEXED).indexId(1, 5782921847050580892L);
5757
entityBuilder.relation("ordersStandalone", 1, 8943758920347589435L, 3, 6367118380491771428L);
@@ -62,7 +62,7 @@ private static byte[] getModel() {
6262
// entityBuilder = modelBuilder.entity("Order");
6363
entityBuilder.id(3, 6367118380491771428L).lastPropertyId(4, 1061627027714085430L);
6464
entityBuilder.property("_id", PropertyType.Long).id(1, 7221142423462017794L)
65-
.flags(PropertyFlags.ID | PropertyFlags.ID_SELF_ASSIGNABLE | PropertyFlags.NOT_NULL);
65+
.flags(PropertyFlags.ID | PropertyFlags.ID_SELF_ASSIGNABLE);
6666
entityBuilder.property("date", PropertyType.Date).id(2, 2751944693239151491L);
6767
entityBuilder.property("customerId", "Customer", PropertyType.Relation).id(3, 7825181002293047239L)
6868
.flags(PropertyFlags.NOT_NULL | PropertyFlags.INDEXED | PropertyFlags.INDEX_PARTIAL_SKIP_ZERO).indexId(2, 8919874872236271392L);

0 commit comments

Comments
 (0)