@@ -462,9 +462,12 @@ Possible keys for hasMany association arrays include:
462462- ** propertyName** : The property name that should be filled with data from the
463463 associated table into the source table results. By default, this is the
464464 underscored & plural name of the association so ` comments ` in our example.
465- - ** strategy** : Defines the query strategy to use. Defaults to ' subquery' . The
466- other valid value is ' select' , which uses the ` IN ` list of parent keys
465+ - ** strategy** : Defines the query strategy to use. Defaults to ` subquery ` . The
466+ other valid value is ` select ` , which uses the ` IN ` list of parent keys
467467 directly instead of a subquery.
468+ ::: tip New default strategy in version 5.4+
469+ The default strategy has changed from ` select ` to ` subquery ` in order to improve performance when the number of parent keys is large.
470+ :::
468471- ** saveStrategy** : Either ` append ` or ` replace ` . Defaults to ` append ` . When ` append ` the current
469472 records are appended to any records in the database. When ` replace ` associated
470473 records not in the current set will be removed. If the foreign key is a nullable
@@ -616,9 +619,12 @@ Possible keys for belongsToMany association arrays include:
616619- ** propertyName** : The property name that should be filled with data from the
617620 associated table into the source table results. By default, this is the
618621 underscored & plural name of the association, so ` tags ` in our example.
619- - ** strategy** : Defines the query strategy to use. Defaults to ' subquery' . The
620- other valid value is ' select' , which uses the ` IN ` list of parent keys
622+ - ** strategy** : Defines the query strategy to use. Defaults to ` subquery ` . The
623+ other valid value is ` select ` , which uses the ` IN ` list of parent keys
621624 directly instead of a subquery.
625+ ::: tip New default strategy in version 5.4+
626+ The default strategy has changed from ` select ` to ` subquery ` in order to improve performance when the number of parent keys is large.
627+ :::
622628- ** saveStrategy** : Either ` append ` or ` replace ` . Defaults to ` replace ` .
623629 Indicates the mode to be used for saving associated entities. The former will
624630 only create new links between both side of the relation and the latter will
0 commit comments