Go library for spatial data operations and geometric algorithms (Go bindings for GEOS)
280
stars
79
forks
source link
Beego Geometry Model Throwing Error (panic: reflect: call of reflect.Value.Interface on zero Value) #12
Open
vishnuchilamakuru opened 9 years ago
My Beego Model,
package models
import ( "github.com/astaxie/beego/orm" _ "github.com/lib/pq" // "time" "github.com/paulsmith/gogeos/geos" )
type Configuration struct {
Id int64
db:"id"
Created int64db:"created_at";auto_now_add
Updated int64db:"updated_at";auto_now
Tenant stringdb:"tenant",size=100
Role stringdb:"role",size=250
ServiceCode stringdb:"service_code",size=100
Url stringdb:url,size=512
Active booldb:is_active
Location stringdb:location
LocationGeom *geos.Geometrydb:location_geom:default(geos.EmptyPolygon())
}func init() { // Need to register model in init orm.RegisterModel( new(Configuration) ) }
I am getting the following Error on starting the application
panic: reflect: call of reflect.Value.Interface on zero Value
goroutine 1 [running]: reflect.valueInterface(0x0, 0x0, 0x0, 0x1, 0x0, 0x0) /usr/local/go/src/reflect/value.go:877 +0x90 reflect.Value.Interface(0x0, 0x0, 0x0, 0x0, 0x0) /usr/local/go/src/reflect/value.go:872 +0x53 github.com/astaxie/beego/orm.getFieldType(0x45d4660, 0xc2080be070, 0xd6, 0x0, 0x0, 0x0)