Set CASCADE delete for ItemPrice from Item deletion
This commit is contained in:
parent
b5747c9d9d
commit
dbe140ecaf
|
@ -17,7 +17,7 @@ type Item struct {
|
|||
Carbs uint64
|
||||
Fats uint64
|
||||
//
|
||||
Prices []ItemPrice
|
||||
Prices []ItemPrice `gorm:"constraint:OnDelete:CASCADE;"`
|
||||
CurrentPriceID uint
|
||||
CurrentPrice *ItemPrice
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue
Block a user