Skip to content

Commit f0744ce

Browse files
Tests: for Customer test return correct relation in ToManyGetter
There is no impact as the ToManyGetter is only used to eagerly resolve ToMany, which is not tested for Customer.ordersStandalone.
1 parent c5c1424 commit f0744ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public long put(Customer entity) {
6969
entity.setId(__assignedId);
7070
entity.__boxStore = boxStoreForEntities;
7171

72-
checkApplyToManyToDb(entity.orders, Order.class);
72+
checkApplyToManyToDb(entity.getOrders(), Order.class);
7373
checkApplyToManyToDb(entity.getOrdersStandalone(), Order.class);
7474

7575
return __assignedId;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public ToOne<Customer> getToOne(Order order) {
125125
new RelationInfo<>(Customer_.__INSTANCE, Order_.__INSTANCE, new ToManyGetter<Customer, Order>() {
126126
@Override
127127
public List<Order> getToMany(Customer customer) {
128-
return customer.getOrders();
128+
return customer.getOrdersStandalone();
129129
}
130130
}, 1);
131131

0 commit comments

Comments
 (0)