- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for ForeignKey (0.07 seconds)
-
schema/relationship.go
if len(relation.foreignKeys) > 0 { ownForeignFields = []*Field{} for _, foreignKey := range relation.foreignKeys { if field := schema.LookUpField(foreignKey); field != nil { ownForeignFields = append(ownForeignFields, field) } else { schema.err = fmt.Errorf("invalid foreign key: %s", foreignKey) return } } } if len(relation.primaryKeys) > 0 {
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
if ref.OwnPrimaryKey || ref.PrimaryValue != "" { association.Error = ref.ForeignKey.Set(association.DB.Statement.Context, fieldValue, reflect.Zero(ref.ForeignKey.FieldType).Interface()) } else { association.Error = ref.ForeignKey.Set(association.DB.Statement.Context, data, reflect.Zero(ref.ForeignKey.FieldType).Interface()) } } } } } } }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) -
generics.go
} for _, ref := range rel.References { fkNil[ref.ForeignKey.DBName] = nil if ref.OwnPrimaryKey && ref.PrimaryKey != nil { ownerPKNames = append(ownerPKNames, ref.PrimaryKey.DBName) primaryColumns = append(primaryColumns, clause.Column{Name: ref.PrimaryKey.DBName}) foreignColumns = append(foreignColumns, clause.Column{Name: ref.ForeignKey.DBName}) } else if !ref.OwnPrimaryKey && ref.PrimaryKey != nil {Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sat Mar 21 11:34:24 GMT 2026 - 26K bytes - Click Count (0) -
gorm.go
for _, ref := range relation.References { f := joinSchema.LookUpField(ref.ForeignKey.DBName) if f == nil { return fmt.Errorf("missing field %s for join table", ref.ForeignKey.DBName) } f.DataType = ref.ForeignKey.DataType f.GORMDataType = ref.ForeignKey.GORMDataType if f.Size == 0 { f.Size = ref.ForeignKey.Size } ref.ForeignKey = f }Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sat Mar 21 11:35:55 GMT 2026 - 13.1K bytes - Click Count (0)