chore: add more comment

This commit is contained in:
chenrui 2022-03-10 20:33:47 +08:00
parent bfffefb179
commit 9d5c68e410
1 changed files with 2 additions and 0 deletions

View File

@ -397,6 +397,8 @@ func saveAssociations(db *gorm.DB, rel *schema.Relationship, values interface{},
}
// check association values has been saved
// if values kind is Struct, check it has been saved.
// if values kind is Slice/Array, check all item has been saved.
func checkAssociationsSaved(db *gorm.DB, values interface{}) (saved bool) {
visitMapStoreKey := "gorm:saved_association_map"
var vistMap VisitMap