六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 134|回复: 0

JPA create sql error

[复制链接]

升级  76%

8

主题

8

主题

8

主题

童生

Rank: 1

积分
38
 楼主| 发表于 2013-2-7 20:54:21 | 显示全部楼层 |阅读模式
在创建entity的时候要注意entity的名字是否是对应的db的保留字现在的开发中用到了lock这个entity,在persistence的时候出现错误:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Lock (lockOwner_UUID, version_UUID, UUID) values (’ff808181211ae76901211ae76c2c0′ at line 1因为lock是mysql的保留字。mysql的所有保留字可以在下面的网页里查到http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表