- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for BELONGSTO (0.04 sec)
-
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",
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 26.5K bytes - Viewed (0) -
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)
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Nov 16 04:11:05 UTC 2025 - 23.1K bytes - Viewed (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) } }
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Oct 26 12:09:12 UTC 2025 - 23.6K bytes - Viewed (0) -
schema/schema_test.go
}, { Name: "Company", Type: schema.BelongsTo, Schema: "User", FieldSchema: "Company", References: []Reference{{"ID", "Company", "CompanyID", "User", "", false}}, }, { Name: "Manager", Type: schema.BelongsTo, Schema: "User", FieldSchema: "User", References: []Reference{{"ID", "User", "ManagerID", "User", "", false}}, }, {Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 13.3K bytes - Viewed (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()Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 12 05:42:26 UTC 2025 - 37.9K bytes - Viewed (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
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Nov 02 14:09:18 UTC 2025 - 25.9K bytes - Viewed (0)