- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for JoinTable (0.21 sec)
-
tests/generics_test.go
} // Left JOIN + Alias WHERE result, err = db.Joins(clause.LeftJoin.Association("Company").As("t"), func(db gorm.JoinBuilder, joinTable clause.Table, curTable clause.Table) error { if joinTable.Name != "t" { t.Fatalf("Join table should be t, but got %v", joinTable.Name) } db.Where("?.name = ?", joinTable, u.Company.Name) return nil }).Where(map[string]any{"name": u.Name}).First(ctx) if err != nil {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 28K bytes - Viewed (0) -
generics.go
q.limitPerRecord = num return q } func (c chainG[T]) Joins(jt clause.JoinTarget, on func(db JoinBuilder, joinTable clause.Table, curTable clause.Table) error) ChainInterface[T] { return c.with(func(db *DB) *DB { if jt.Table == "" { jt.Table = clause.JoinTable(strings.Split(jt.Association, ".")...).Name } q := joinBuilder{db: db.Session(&Session{NewDB: true, Initialized: true}).Table(jt.Table)}
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 15.5K bytes - Viewed (0)