Your Question

Is it possible to populate Virtual field of Nested model in gorm for total_unique_visit and total_visit when querying Website model

type Page struct {
    // ...
    TotalUniqueVisit int `json:"total_unique_visit" gorm:"->;-:migration;"`
    TotalVisit       int `json:"total_visit" gorm:"->;-:migration;"`
    // ...
}

type Website struct {
    // ...
     Page *Page
}

The document you expected this should be explained

Expected answer