You need to use Unscoped mode
Association(YourStruct).Unscoped(). Replace(YourStruct.AnotherStruct)
https://gorm.io/docs/associations.html#Delete-Association-Recordenter Source code