- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for joins_with_select (0.07 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/joins_test.go
type result struct { ID uint PetID uint Name string } user := *GetUser("joins_with_select", Config{Pets: 2}) DB.Save(&user) var results []result DB.Table("users").Select("users.id, pets.id as pet_id, pets.name").Joins("left join pets on pets.user_id = users.id").Where("users.name = ?", "joins_with_select").Scan(&results) sort.Slice(results, func(i, j int) bool {Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 15K bytes - Click Count (0)