peterkeri
Update only one field in a custom action?
@.valpuia
Before added ->dehydrated(false), if I called
the save() updated the meta property too (meta stored in another table with hasOne relation) in the database with the posted meta data (what is dirty or not) for the original record. I don't want it, I want update ONLY the is_active field. Now the meta data not udpated - as you said - beacuse of dehydration.
39 replies
Update only one field in a custom action?
@.valpuia
now the related data not updated --> it seems okay. i think only one thing left: the related data (meta stored in another table with hasOne relation) not created when i call static::getModel()::create($data) function for the new record
39 replies
Update only one field in a custom action?
@.valpuia
ok, i made the changes, now:
- the edit form filled with data --> OK
- the edited record set to inactive --> OK
- the new record created -- OK
problems:
my main problem has NOT solved. As you see the key-value component use a relationship. This data has been updated too when I use this:
Here is the action:
39 replies
Update only one field in a custom action?
I have shipment orders what has different properties (for example package types). This package types contains important values (what we used for accountant modules). When a shipment record created it used the currently active package type entry.
I should NOT modify these data, so thats why I have to create a new version of the package type recod every time when any data has changed. So all shipment orders used "his version" of the package tpye. i hope i can explain it clearly
39 replies