Order with auto_preload in GORM

Hi.
Is it possible to order auto_preload in GORM?

I think it is not possible to do it with the help of tags(auto-reload). But it is possible to order it with custom preloading.

db.Preload("Orders", func(db *gorm.DB) *gorm.DB {
  return db.Order("orders.amount DESC")
}).Find(&users)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.