Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8afcfcfc2d |
@@ -366,3 +366,7 @@ func (dH *DBHandler) Exists(model any, relation string, key string, value any, l
|
||||
func (dH *DBHandler) AddRelation(model, relation any, relationName string) error {
|
||||
return dH.db.Model(model).Association(relationName).Append(relation)
|
||||
}
|
||||
|
||||
func (dH *DBHandler) DeleteRelation(model, relation any, relationName string) error {
|
||||
return dH.db.Model(model).Association(relationName).Delete(relation)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user