GORM Playground Link

https://github.com/go-gorm/playground/pull/468

Description

Have a struct that has couple of fields of interface{} type, struct is used in different dialects

type User struct {
         ...
    ExternalKey interface{} `json:"id,omitempty" bson:"_id,omitempty" gorm:"type:varchar (36)"`
}

On select will set the value to struct in AfterFind

func (user *User) AfterFind(tx *gorm.DB) (err error) {
    //user.ExternalKey is **interface{}
    ...
    return
}

The user.ExternalKey will point to same location when try to receive a list of structs