Skip to content

Commit a230d79

Browse files
committed
Add 'targetForeignKey' doc to belongsToMany.
1 parent eee474b commit a230d79

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/ORM/Table.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -640,18 +640,19 @@ public function hasMany($associated, array $options = []) {
640640
*
641641
* The options array accept the following keys:
642642
*
643-
* - className: The class name of the target table object
644-
* - targetTable: An instance of a table object to be used as the target table
645-
* - foreignKey: The name of the field to use as foreign key
643+
* - className: The class name of the target table object.
644+
* - targetTable: An instance of a table object to be used as the target table.
645+
* - foreignKey: The name of the field to use as foreign key.
646+
* - targetForeignKey: The name of the field to use as the target foreign key.
646647
* - joinTable: The name of the table representing the link between the two
647648
* - through: If you choose to use an already instantiated link table, set this
648649
* key to a configured Table instance containing associations to both the source
649650
* and target tables in this association.
650651
* - cascadeCallbacks: Set to true if you want CakePHP to fire callbacks on
651652
* cascaded deletes. If false the ORM will use deleteAll() to remove data.
652653
* When true join/junction table records will be loaded and then deleted.
653-
* - conditions: array with a list of conditions to filter the join with
654-
* - sort: The order in which results for this association should be returned
654+
* - conditions: array with a list of conditions to filter the join with.
655+
* - sort: The order in which results for this association should be returned.
655656
* - strategy: The strategy to be used for selecting results Either 'select'
656657
* or 'subquery'. If subquery is selected the query used to return results
657658
* in the source table will be used as conditions for getting rows in the

0 commit comments

Comments
 (0)