Skip to content

Commit 8d67eec

Browse files
authored
Fix JoinColumn documentation (doctrine#7966)
1 parent a418cf6 commit 8d67eec

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

docs/en/reference/annotations-reference.rst

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -619,22 +619,17 @@ Examples:
619619
This annotation is used in the context of relations in
620620
:ref:`@ManyToOne <annref_manytoone>`, :ref:`@OneToOne <annref_onetoone>` fields
621621
and in the Context of :ref:`@JoinTable <annref_jointable>` nested inside
622-
a @ManyToMany. This annotation is not required. If it is not
623-
specified the attributes *name* and *referencedColumnName* are
624-
inferred from the table and primary key names.
625-
626-
Required attributes:
622+
a @ManyToMany. If this annotation or both *name* and *referencedColumnName*
623+
are missing they will be computed considering the field's name and the current
624+
:doc:`naming strategy <namingstrategy>`.
627625

626+
Optional attributes:
628627

629628
- **name**: Column name that holds the foreign key identifier for
630629
this relation. In the context of @JoinTable it specifies the column
631630
name in the join table.
632631
- **referencedColumnName**: Name of the primary key identifier that
633-
is used for joining of this relation.
634-
635-
Optional attributes:
636-
637-
632+
is used for joining of this relation. Defaults to *id*.
638633
- **unique**: Determines whether this relation is exclusive between the
639634
affected entities and should be enforced as such on the database
640635
constraint level. Defaults to false.

0 commit comments

Comments
 (0)