I'm trying to do crud operation using grom and mysql. when i do that i got a problem that grom didn't i identify the correct table in the mysql it gives following error when run the app
(/api/controllers/table.go:30)
[2016-03-23 09:56:39] [0.99ms] SELECT FROM tables
2016/03/23 09:56:39 Error when looking up tables, the error is '&{0xc8202140e0 sql: Scan error on column index 3: unsupported driver -> Scan pair: []uint8 -> time.Time 1 <nil> 0xc82022f860 0xc82022f7c0 0xc82021e140 2 {0xc8201fb4a0} <nil> false map[] map[]}'
[GIN] 2016/03/23 - 09:56:39 | 404 | 1.153811ms | 127.0.0.1 | GET /table
what the reason for this ? and i did post a question in stack-overflow also plz take a look at that also (http://goo.gl/xoYuaT)
评论:
hayzeus:
This sounds like an issue with your driver, not gorm. I use gorm, but with postgres, so I don't know what the specific deal is with mysql.
Here's an example of using gorm with mysql: https://github.com/ant0ine/go-json-rest-examples/blob/master/gorm/main.go
