- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for belongs_to (0.11 sec)
-
schema/relationship.go
HasMany RelationshipType = "has_many" // HasManyRel has many relationship BelongsTo RelationshipType = "belongs_to" // BelongsToRel belongs to relationship Many2Many RelationshipType = "many_to_many" // Many2ManyRel many to many relationship has RelationshipType = "has" ) type Relationships struct { HasOne []*Relationship BelongsTo []*Relationship HasMany []*Relationship Many2Many []*Relationship
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
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 Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K 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 Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.3K bytes - Viewed (0)