-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
I have this models that wants to map a slice of Country to a slice of CountryRes
Source:
// Base model
type BaseModel struct {
Id int `json:"id"`
}
// Country model
type Country struct {
BaseModel
Name string `json:"name"`
}
//
type CountryRes struct {
Id int `json:"id"`
Name string `json:"name"`
}
When I want to map a slice of Country to a slice of CountryRes the Id field has been ignored.
var items *[]Country = new([]Country)
var mitems *[]CountryRes = new([]CountryRes)
err = mapper.MapperSlice(items, mitems)
The execution didn't have any errors but the Id field had been ignored.
Metadata
Metadata
Assignees
Labels
No labels