- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for GetRelationsValues (0.39 sec)
-
schema/utils.go
t := tag.Get("gorm") if strings.Contains(t, value) { return tag } return reflect.StructTag(fmt.Sprintf(`gorm:"%s;%s"`, value, t)) } // GetRelationsValues get relations's values from a reflect value func GetRelationsValues(ctx context.Context, reflectValue reflect.Value, rels []*Relationship) (reflectResults reflect.Value) { for _, rel := range rels {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Oct 30 11:15:36 UTC 2025 - 5.9K bytes - Viewed (0) -
association.go
} case schema.HasOne, schema.HasMany: var ( primaryFields []*schema.Field foreignKeys []string updateMap = map[string]interface{}{} relValues = schema.GetRelationsValues(association.DB.Statement.Context, reflectValue, []*schema.Relationship{rel}) modelValue = reflect.New(rel.FieldSchema.ModelType).Interface() tx = association.DB.Model(modelValue) )
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Oct 26 12:09:12 UTC 2025 - 23.6K bytes - Viewed (0)