From c905c10c93cc9b06e13bb0b8f74ac57795cdc2ae Mon Sep 17 00:00:00 2001 From: Allan Date: Sat, 7 Aug 2021 16:04:25 +0200 Subject: [PATCH] Document that link() will not trigger events/behaviors (#18683) --- framework/db/BaseActiveRecord.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/db/BaseActiveRecord.php b/framework/db/BaseActiveRecord.php index 601055c..d567547 100644 --- a/framework/db/BaseActiveRecord.php +++ b/framework/db/BaseActiveRecord.php @@ -1278,7 +1278,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface * * The relationship is established by setting the foreign key value(s) in one model * to be the corresponding primary key value(s) in the other model. - * The model with the foreign key will be saved into database without performing validation. + * The model with the foreign key will be saved into database **without** performing validation + * and **without** events/behaviors. * * If the relationship involves a junction table, a new row will be inserted into the * junction table which contains the primary key values from both models.