can't do crud operation using grom orm, grom doesn't identify the mysql tables

xuanbao · 2016-03-30 07:17:13 · 814 次点击    
这是一个分享于 2016-03-30 07:17:13 的资源,其中的信息可能已经有所发展或是发生改变。

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


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

814 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传