yii2-relation-trait
yii2-relation-trait copied to clipboard
Yii 2 Models add functionality for load with relation, & transactional save with relation PLUS soft delete/restore feature
Hi, I've built a crud app with mootensai/yii2-enhanced-gii, there are related tables by foreign keys (n:1, n:m). In the case I got an validation error, after pressing update a second...
Can't save updated record
- add new first has-many relation to entity (with empty id) - save all relations - add new second has-many relation and delete first (with empty id) - save all...
fix issue with has many deletion #57
As mentioned in the description of the extension, the hasMany relation array must have numerical keys: ``` // has many [relationName] => Array ( [0] => Array ( [relAttr] =>...
#54 Fixes Fixed random deletion of data due to not honouring the onCondition and where condition
https://github.com/mootensai/yii2-relation-trait/blob/8149499fb4dc168c13bb1b97ebc23b6f570c425a/RelationTrait.php#L230 In line 190...199, when getting the primaryKey, it cames null, i could not figure why, it seems that after the save, the related model loses the primarykey/id Could you...
I have created a manual method for filtering relation data. But relation trait not supported this method with a parameter or how to send the parameter to this new method?...
Firstly thank you for this extension and sorry for my bad english! I'm using this extension with [Yii2-dynamicforms](https://github.com/wbraganca/yii2-dynamicform) and it works perfecly on [simple scenario](http://wbraganca.com/yii2extensions/dynamicform-demo1/source-code), avoiding unnecessary code. Now I'm...