Hacker News new | ask | show | jobs
by malteg 455 days ago
something like https://gorm.io/docs/update.html#Update-from-SubQuery ?
1 comments

Yup, 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.