annotation Athena::ORM::Annotations::InverseJoinColumn
#
Configures the column of a AORMA::ManyToMany association's join table that references the target entity.
Without it, the column is named after the target entity's class in snake case followed by _id, and references its id column.
@[AORMA::ManyToMany]
@[AORMA::JoinTable(name: "users_groups")]
@[AORMA::JoinColumn(name: "user_id", referenced_column_name: "id")]
@[AORMA::InverseJoinColumn(name: "group_id", referenced_column_name: "id")]
property groups : AORM::Collection(Group) = AORM::ArrayCollection(Group).new
See AORMA::JoinColumn for the column referencing this entity.
Configuration#
Optional Arguments#
name#
Type: String? Default: the target entity's class name in snake case followed by _id
The name of the join table column. Wrap it in backticks if it needs to be quoted, see Quoting Reserved Words.
referenced_column_name#
Type: String? Default: "id"
The name of the target entity's column the join table column references.
on_delete#
Type: String? Default: nil
The ON DELETE action of the foreign key constraint, the same as on AORMA::JoinColumn.
unique, deferrable, column_definition#
The same as on AORMA::JoinColumn.
Todo
Only used to generate a schema, which isn't supported yet; they're ignored.