Skip to content

Commit

Permalink
doc: added note about not fully functional 1:1 relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Aug 18, 2015
1 parent b0c5cb1 commit 60f031c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/entity.texy
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ Each property can be annotated with a modifier. Modifiers are optional and provi
- `{container ContainerClassName}` - sets property container/injection.
- `{1:m TargetEntity::$property}` - see [relationships].
- `{m:1 TargetEntity::$property}` - see [relationships].
- `{1:1 TargetEntity::$property}` - see [relationships].
- `{m:n TargetEntity::$property primary}` - see [relationships].
- `{1:1d TargetEntity::$property primary}` - see [relationships].
- `{1:1 TargetEntity::$property}` - see [relationships].

--------

Expand Down
2 changes: 1 addition & 1 deletion doc/relationships.texy
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Orm provides very efficient way to work with entity relationships. Orm recognize

- **1:m** - one has many: *author has many books*
- **m:1** - many has one: *book has one author*
- **1:1** - one has one: the references for related entity are stored on both sides
- **m:n** - many has many: *book has many tags, tag is associated with many books*
- **1:1d** - one has one directed: modified "1:1", the reference for related entity is stored only on the side, which is marked as primary.
- **1:1** - one has one: the references for related entity are stored on both sides; **Functionality of this type of relationship is incomplete and not fully tested. Currently, recursive persistence will not work.**

To define relationship property use relationship modifier. They all require target entity, other parameters are optional: name of the reverse symmetric property, ordering, or making the current side primary (persisting is driven by the primary side). At least one side of `m:n` or `1:1d` has to be defined as the primary. Relationships do not support getters and setters as other entity properties.

Expand Down

0 comments on commit 60f031c

Please sign in to comment.