File tree Expand file tree Collapse file tree
objectbox-java-api/src/main/java/io/objectbox/annotation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626/**
2727 * Defines a backlink relation, which is based on another relation reversing the direction.
2828 * <p>
29- * Example: one "Order" references one "Customer" (to-one relation) .
29+ * Example (to-one relation) : one "Order" references one "Customer".
3030 * The backlink to this is a to-many in the reverse direction: one "Customer" has a number of "Order"s.
31- *
32- * Note: backlinks to to-many relations will be supported in the future.
31+ * <p>
32+ * Example (to-many relation): one "Teacher" references multiple "Student"s.
33+ * The backlink to this: one "Student" has a number of "Teacher"s.
34+ * <p>
35+ * Note: changes made to a backlink relation based on a to-many relation are ignored.
3336 */
3437@ Retention (RetentionPolicy .CLASS )
3538@ Target (ElementType .FIELD )
3639@ Beta
3740public @interface Backlink {
3841 /**
39- * Name of the relation the backlink should be based on (e.g. name of a ToOne property in the target entity).
42+ * Name of the relation the backlink should be based on (e.g. name of a ToOne or ToMany property in the target entity).
4043 * Can be left empty if there is just a single relation from the target to the source entity.
4144 */
4245 String to () default "" ;
You can’t perform that action at this time.
0 commit comments