-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
type:with reproduction stepswith reproduction stepswith reproduction steps
Description
Hello.
I was using the preload function using the subquery through custom preloading sql in gorm, but the recent update made it impossible to use the subquery in the preload.
go-gorm/playground#807
I've written a detailed case in the pull request above.
Preload("Pets", func(db *gorm.DB) *gorm.DB { subscope := db.Select("MAX(id) as id").Model(&Pet{}).Group("name") return db.Where("id in (?)", subscope)
I'd appreciate it if you could check it out.
Metadata
Metadata
Assignees
Labels
type:with reproduction stepswith reproduction stepswith reproduction steps