- Sort Score
- Num 10 results
- Language All
Results 1 - 5 of 5 for BELONGSTO (0.07 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
schema/relationship.go
schema.buildPolymorphicRelation(relation, field) } else if many2many := field.TagSettings["MANY2MANY"]; many2many != "" { schema.buildMany2ManyRelation(relation, field, many2many) } else if belongsTo := field.TagSettings["BELONGSTO"]; belongsTo != "" { schema.guessRelation(relation, field, guessBelongs) } else { switch field.IndirectFieldType.Kind() { case reflect.Struct: schema.guessRelation(relation, field, guessGuess)
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sun Nov 16 04:11:05 GMT 2025 - 23.1K bytes - Click Count (1) -
association.go
reflectValue := association.DB.Statement.ReflectValue rel := association.Relationship var oldBelongsToExpr clause.Expression // we have to record the old BelongsTo value if association.Unscope && rel.Type == schema.BelongsTo { var foreignFields []*schema.Field for _, ref := range rel.References { if !ref.OwnPrimaryKey { foreignFields = append(foreignFields, ref.ForeignKey) } }
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sun Oct 26 12:09:12 GMT 2025 - 23.6K bytes - Click Count (0) -
schema/relationship_test.go
"Country": { Name: "Country", Type: schema.BelongsTo, Schema: "Org", FieldSchema: "Country", References: []Reference{ {PrimaryKey: "ID", PrimarySchema: "Country", ForeignKey: "CountryID", ForeignSchema: "Org"}, }, }, }, }, "VisitingAddress": { Relations: map[string]Relation{ "Country": { Name: "Country", Type: schema.BelongsTo, Schema: "Org", FieldSchema: "Country",
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Mon Aug 18 11:44:52 GMT 2025 - 26.5K bytes - Click Count (0) -
tests/association_generics_test.go
} if newUser.Company.Name != company.Name { t.Errorf("expected company name %s, got %s", company.Name, newUser.Company.Name) } } // BelongsTo: create and assign company via OpCreate func TestClauseAssociationSetUpdateBelongsToCreateValues(t *testing.T) { ctx := context.Background()Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Fri Sep 12 05:42:26 GMT 2025 - 37.9K bytes - Click Count (0) -
generics.go
return assocDB.Updates(fkNil).Error case clause.OpDelete: return assocDB.Delete(assocModel).Error case clause.OpUpdate: return assocDB.Updates(setMap).Error } case schema.BelongsTo: switch op.Type { case clause.OpDelete: return base.Transaction(func(tx *DB) error { assocDB.Statement.ConnPool = tx.Statement.ConnPool base.Statement.ConnPool = tx.Statement.ConnPool
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sat Mar 21 11:34:24 GMT 2026 - 26K bytes - Click Count (0)