1 parent ff4e53d commit 6be50d6Copy full SHA for 6be50d6
1 file changed
objectbox-java/src/main/java/io/objectbox/relation/ToOne.java
@@ -112,7 +112,6 @@ private void ensureBoxes(TARGET target) {
112
Field boxStoreField = ReflectionCache.getInstance().getField(entity.getClass(), "__boxStore");
113
try {
114
boxStore = (BoxStore) boxStoreField.get(entity);
115
- debugRelations = boxStore.isDebugRelations();
116
if (boxStore == null) {
117
if (target != null) {
118
boxStoreField = ReflectionCache.getInstance().getField(target.getClass(), "__boxStore");
@@ -123,6 +122,7 @@ private void ensureBoxes(TARGET target) {
123
122
"call box.attach(entity) beforehand.");
124
}
125
+ debugRelations = boxStore.isDebugRelations();
126
} catch (IllegalAccessException e) {
127
throw new RuntimeException(e);
128
0 commit comments