Browse Source

Prepare for 1.5.1 release

tags/1.5.1 1.5.1
Alban Jubert 6 years ago
parent
commit
1fb2208c58
  1. 23
      CHANGELOG.md
  2. 7
      README.md

23
CHANGELOG.md

@ -1,5 +1,28 @@
# Yii2 Active Record Save Relations Behavior Change Log # Yii2 Active Record Save Relations Behavior Change Log
## [1.5.1]
### 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]
### 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] ## [1.4.1]
### Fixed ### Fixed
- Bug #24: Fix a regression introduced in 1.4.0 release where validation of hasOne relations was not triggered. (thx @dabkhazi) - Bug #24: Fix a regression introduced in 1.4.0 release where validation of hasOne relations was not triggered. (thx @dabkhazi)

7
README.md

@ -204,6 +204,13 @@ For instance, in the following configuration, the `links ` related records will
} }
... ...
``` ```
It is also possible to set a relation scenario at runtime using the `setRelationScenario` as follow:
```php
$model->setRelationScenario('relationName', 'scenarioName');
```
> **Tips:** > **Tips:**
> For relations not involving a junction table by using the `via()` or `viaTable()` methods, you should remove the attributes pointing to the owner model from the 'required' validation rules to be able to pass the validations. > For relations not involving a junction table by using the `via()` or `viaTable()` methods, you should remove the attributes pointing to the owner model from the 'required' validation rules to be able to pass the validations.

Loading…
Cancel
Save