@@ -44,13 +44,20 @@ public final class ModelProperty extends Table {
44
44
public io .objectbox .model .IdUid indexId () { return indexId (new io .objectbox .model .IdUid ()); }
45
45
public io .objectbox .model .IdUid indexId (io .objectbox .model .IdUid obj ) { int o = __offset (12 ); return o != 0 ? obj .__assign (o + bb_pos , bb ) : null ; }
46
46
/**
47
- * For relations only: name of the target entity
47
+ * For relations only: name of the target entity (will be replaced by "target entity ID" at the schema level)
48
48
*/
49
49
public String targetEntity () { int o = __offset (14 ); return o != 0 ? __string (o + bb_pos ) : null ; }
50
50
public ByteBuffer targetEntityAsByteBuffer () { return __vector_as_bytebuffer (14 , 1 ); }
51
51
public ByteBuffer targetEntityInByteBuffer (ByteBuffer _bb ) { return __vector_in_bytebuffer (_bb , 14 , 1 ); }
52
52
/**
53
- * E.g. for virtual to-one target ID properties, this references the ToOne object
53
+ * This will probably move out of the core model into something binding specific.
54
+ * A virtual property's "target name" typically references an existing field in the entity at the language level
55
+ * of the binding. In contrast to this, the virtual property (via model "name") does not exist in the entity at
56
+ * the language level (thus virtual), but in ObjectBox's core DB.
57
+ * Example: consider a Java entity which has a ToOne (a Java specific relation wrapper) member called "parent".
58
+ * ObjectBox core is unaware of that ToOne, but works with the "parentId" relation property,
59
+ * which in turn does not exist in the Java entity.
60
+ * The mapping between "parentId" and "parent" is done by our JNI binding.
54
61
*/
55
62
public String virtualTarget () { int o = __offset (16 ); return o != 0 ? __string (o + bb_pos ) : null ; }
56
63
public ByteBuffer virtualTargetAsByteBuffer () { return __vector_as_bytebuffer (16 , 1 ); }
0 commit comments