I get some map by using the Values method
var radio []orm.Params
num, _ := orm.NewOrm().
QueryTable("product_album").
Filter("product_id", id).
Filter("state", 1).
Values(&radio)
but the first letter of the result is all uppercase. I have set the lowercase rule in model
type ProductAlbum struct {
Id int `json:"id"`
ProductId int `json:"product_id"`
Name string `json:"name"`
Url string `json:"url"`
State string `json:"state"`
}
result of error
"radio": [
{
"Id": 37,
"Name": "",
"ProductId": 9,
"State": "0",
"Url": "7d9006e1d73d527662e598c1856327f28742"
},
{
"Id": 55,
"Name": "",
"ProductId": 9,
"State": "0",
"Url": "38909849c3289db116c020c3d34cfb6f3975"
},
{
"Id": 56,
"Name": "",
"ProductId": 9,
"State": "0",
"Url": "a164deb99004f9647f87f21771d19b468181"
}
]
expected results
"radio": [
{
"id": 37,
"name": "",
"productId": 9,
"state": "0",
"url": "7d9006e1d73d527662e598c1856327f28742"
},
{
"id": 55,
"name": "",
"productId": 9,
"state": "0",
"url": "38909849c3289db116c020c3d34cfb6f3975"
},
{
"id": 56,
"name": "",
"productId": 9,
"state": "0",
"url": "a164deb99004f9647f87f21771d19b468181"
}
]
ask the boss to give us some advice, thank you