Skip to content

Commit 4496d52

Browse files
committed
change RelationInfo signature
1 parent 330639d commit 4496d52

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

objectbox-java/src/main/java/io/objectbox/relation/RelationInfo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, Proper
5353
/**
5454
* ToMany as a ToOne backlink
5555
*/
56-
public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, Property targetIdProperty,
57-
ToManyGetter toManyGetter, ToOneGetter backlinkToOneGetter) {
56+
public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, ToManyGetter toManyGetter,
57+
Property targetIdProperty, ToOneGetter backlinkToOneGetter) {
5858
this.sourceInfo = sourceInfo;
5959
this.targetInfo = targetInfo;
6060
this.targetIdProperty = targetIdProperty;
@@ -67,8 +67,8 @@ public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, Proper
6767
/**
6868
* Stand-alone ToMany.
6969
*/
70-
public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, int relationId,
71-
ToManyGetter toManyGetter) {
70+
public RelationInfo(EntityInfo sourceInfo, EntityInfo<TARGET> targetInfo, ToManyGetter toManyGetter,
71+
int relationId) {
7272
this.sourceInfo = sourceInfo;
7373
this.targetInfo = targetInfo;
7474
this.relationId = relationId;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,24 @@ public long getId(Customer object) {
9090
}
9191

9292
static final RelationInfo<Order> orders =
93-
new RelationInfo<>(Customer_.__INSTANCE, Order_.__INSTANCE, Order_.customerId, new ToManyGetter<Customer>() {
93+
new RelationInfo<>(Customer_.__INSTANCE, Order_.__INSTANCE, new ToManyGetter<Customer>() {
9494
@Override
9595
public ToMany<Order> getToMany(Customer customer) {
9696
return (ToMany<Order>) customer.getOrders();
9797
}
98-
}, new ToOneGetter<Order>() {
98+
}, Order_.customerId, new ToOneGetter<Order>() {
9999
@Override
100100
public ToOne<Customer> getToOne(Order order) {
101101
return order.customer__toOne;
102102
}
103103
});
104104

105105
static final RelationInfo<Order> ordersStandalone =
106-
new RelationInfo<>(Customer_.__INSTANCE, Order_.__INSTANCE, 1, new ToManyGetter<Customer>() {
106+
new RelationInfo<>(Customer_.__INSTANCE, Order_.__INSTANCE, new ToManyGetter<Customer>() {
107107
@Override
108108
public ToMany<Order> getToMany(Customer customer) {
109109
return (ToMany<Order>) customer.getOrders();
110110
}
111-
});
111+
}, 1);
112112

113113
}

0 commit comments

Comments
 (0)