Releases: mootensai/yii2-relation-trait
Bug fixes
Support standard form array of POST and bug fix
Add Soft Delete/Restore Feature!
Adding Soft Delete/Restore feature!
add this line to your Model to enable soft delete
private $_rt_softdelete = ['<column>' => <deleted row marker value>];
example
private $_rt_softdelete = ['isdeleted' => 1];
or
private $_rt_softdelete = ['deleted_by' => Yii::app()->user->id]
add this line to your Model to enable soft restore
private $_rt_softrestore = ['<column>' => <undeleted row marker value];
example
private $_rt_softrestore = ['isdeleted' => 0];
or
private $_rt_softdelete = ['deleted_by' => 0];
Change delete SQL to Yii Query Builder
- Change delete SQL to Yii Query Builder to fix different database quoting like issue #30
- Fix translation message error for
Yii:t('mtrelt',"xx")
Fix #19
Bug fixes & change
Add support for hasOne Relation, skippedRelations & bug fix
Add support for hasOne Relation, skippedRelations & bug fix
Please try! Thank you for your contribution & support by clicking the star button 😄
Fixes #7
Fix bug when create still wants to delete data
Fix bug when the model is new record
the trait still wants to delete data
Minor bug fix
Minor bug fix.
remove empty() on line 39 to support PHP below 5.5