3 ms·
something like https://gorm.io/docs/update.html#Update-from-SubQuery https://gorm.io/docs/update.html#Update-from-SubQuery ?
by malteg 2y ago
something like https://gorm.io/docs/update.html#Update-from-SubQuery https://gorm.io/docs/update.html#Update-from-SubQuery ?
- btdmaster 2y agoYup, but when I've tried gorm this is not generic enough to let me do this nested generically (with relations). In gorm you can't do Car.update({'soundsystem': [{id: 'bluetoothProtocolId'}]}), you can only do something like Car.Association('soundsystem').update([{id:'bluetoothProtocolId'}]), fundamental difference being that the latter is dealing with Car internals and is not generic.