- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for OwnPrimaryKey (0.3 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
association.go
// 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) } } if _, fvs := schema.GetIdentityFieldValuesMap(association.DB.Statement.Context, reflectValue, foreignFields); len(fvs) > 0 {
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) -
callbacks/associations.go
continue } setupReferences := func(obj reflect.Value, elem reflect.Value) { for _, ref := range rel.References { if !ref.OwnPrimaryKey { pv, _ := ref.PrimaryKey.ValueOf(db.Statement.Context, elem) db.AddError(ref.ForeignKey.Set(db.Statement.Context, obj, pv)) if dest, ok := db.Statement.Dest.(map[string]interface{}); ok {
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Thu Feb 13 06:16:26 GMT 2025 - 14.4K bytes - Click Count (0) -
generics.go
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) -
callbacks/preload.go
joinRelForeignFields = make([]*schema.Field, 0, len(rel.References)) joinForeignKeys = make([]string, 0, len(rel.References)) ) for _, ref := range rel.References { if ref.OwnPrimaryKey { joinForeignKeys = append(joinForeignKeys, ref.ForeignKey.DBName) joinForeignFields = append(joinForeignFields, ref.ForeignKey) foreignFields = append(foreignFields, ref.PrimaryKey)
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 11.7K bytes - Click Count (0)