E0501: A Schema field isn't the model's
A model's Schema method names each field by its address, &p.Title, and the orm maps the address back to a field of the model it calls Schema on. s.Field is given something else — a value, a variable's address, an element of an array — or Schema has a value receiver, whose fields' addresses are a copy's. Reported by every query of the model, orm.Check and vukavet.
Wrong
go
func (p Post) Schema(s *orm.Schema) {
s.Field(p.Title, orm.Char{Max: 200})
}Right
go
func (p *Post) Schema(s *orm.Schema) {
s.Field(&p.Title, orm.Char{Max: 200})
}