Yii2 Save Relations Behavior Versions Save

Validate and save automatically related Active Record models.

1.7.2

4 years ago

Fixed

  • Fix #45: Newly created Has One relations were not deleted in case owner model validation failed (thx @douglasgsouza)

1.7.1

5 years ago

Fixed

  • Fix #23: Relational data was not loaded for nested relational models (thx @toreonify)

1.7.0

5 years ago

Added

  • Enh #42: Add the ability to retrieve old relations values
  • Enh #43: Add the ability to retrieve and mark dirty relations

1.6.0

5 years ago

Many thanks to @leandrogehlen for its numerous ideas and contributions to that release ?

Fixed

  • Bug #36: Fix an issue with HasMany relations with composite keys (thx @leandrogehlen)
  • Bug #41: Fixes error loading hasMany relation without referenced key in data (thx @leandrogehlen)
  • Fix for transaction being started during the beforeValidate event (thx @leandrogehlen)

Added

  • Enh #37: Add a relationKeyName property to determine the key used to load relations data.

Changed

  • Removed isModelTransactional protected method. Transactions are not started by the behavior any more.

1.5.2

5 years ago

Fixed

  • Fix a regression in Has One saving introduced by #30 fix.

1.5.1

5 years ago

Fixed

  • Bug #33: Custom relation scenario was set too late and was preventing attributes from being correctly set (thx @phrakon)

Added

  • New method setRelationScenario can set a relation scenario at runtime

Changed

  • Light refactoring
  • Updated documentation

1.5.0

5 years ago

Added

  • Enh #5: Ability to automaticaly delete related records along with the main model

Fixed

  • Bug #30: HasOne relation saving issue (thx @phrakon)
  • Fix for SaveRelationTrait (thx @leandrogehlen)

Changed

  • Some code refactoring
  • Yii2 requirements raised to 2.0.14

1.4.1

6 years ago

Fix a regression where validation of hasOne relations was not triggered.

1.4.0

6 years ago

Fixed

  • Bug #25: Fix for Yii 2.0.14 compatibility. Has many relations were not saved. (thx @SanChes-tanker)

Added

  • Enh #15: Allow to save extra columns to junction table (thx @sspat)

1.3.2

6 years ago

Fixed

  • Bug #22: Fix for HasOne relation pointing to the owner primary key (thx @mythicallage)