@@ -44,13 +44,20 @@ public final class ModelProperty extends Table {
4444 public io .objectbox .model .IdUid indexId () { return indexId (new io .objectbox .model .IdUid ()); }
4545 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 ; }
4646 /**
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)
4848 */
4949 public String targetEntity () { int o = __offset (14 ); return o != 0 ? __string (o + bb_pos ) : null ; }
5050 public ByteBuffer targetEntityAsByteBuffer () { return __vector_as_bytebuffer (14 , 1 ); }
5151 public ByteBuffer targetEntityInByteBuffer (ByteBuffer _bb ) { return __vector_in_bytebuffer (_bb , 14 , 1 ); }
5252 /**
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.
5461 */
5562 public String virtualTarget () { int o = __offset (16 ); return o != 0 ? __string (o + bb_pos ) : null ; }
5663 public ByteBuffer virtualTargetAsByteBuffer () { return __vector_as_bytebuffer (16 , 1 ); }
0 commit comments