Yii2 Save Relations Behavior Versions Save

Validate and save automatically related Active Record models.

1.3.1

6 years ago

Added

  • Enh #19: Support for defining relations through the getRelation method (thx @execut)
  • Enh #21: Better support of partial composite keys (thx @execut)

1.3.0

6 years ago

Added

  • Enh #3: Ability to define validation scenario for related records
  • Enh #7: Exception logging during beforeValidate and afterSave events.
  • More test cases

Fixed

  • False positive testLoadRelationsShouldSucceed test case

Changed

  • afterSave throw exception if a related record fail to be saved. In that case, a database rollback is triggered (when relevant) and an error is attached to the according relation attribute
  • related record are now correctly updated based on there primary key (Thanks to @DD174)

1.2.0

7 years ago

Use of ActiveQueryInterface and BaseActiveRecord to ensure broader DB driver compatibility

1.1.3

7 years ago

Fix for relations as array being inserted then deleted instead of being updated

1.1.2

7 years ago

Fix for empty value assignment on HasMany relations

1.1.1

7 years ago

Fix for bug #12 (Thx @magicaner)

1.1.0

7 years ago

Add SaveRelationsTrait Add ability to set HasMany relation using a single object (Thanks to @sankam-nikolya and @k0R73z))

1.0.2

8 years ago

Fix a bug that was preventing new records to be correctly saved for hasMany relations.

1.0.1

8 years ago

Setting null for a named relation is now correctly handled. A new related model instance was previously generated instead.

1.0.0

8 years ago

First release.