Mysql JSF,Hibernate
我有一张叫做Items的桌子。当我尝试在MyEclipse中执行“Hibernate反向工程”并运行该程序时,出现以下错误:Mysql JSF,Hibernate,mysql,hibernate,hql,Mysql,Hibernate,Hql,我有一张叫做Items的桌子。当我尝试在MyEclipse中执行“Hibernate反向工程”并运行该程序时,出现以下错误: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:
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 '?tems0_.ItemID as ItemID8_, ?tems0_.ItemGroupID as ItemGrou2_8_, ?tems0_.ItemEnt' at line 1
我在hibernate.cfg.xml上写了show\u sql=true
。现在我得到了sql,但我不知道问题出在哪里?有人能帮我吗
这是我在控制台上的sql:
休眠:
select ıtems0_.ItemID as ItemID8_, ıtems0_.ItemGroupID as ItemGrou2_8_,
ıtems0_.ItemEnterDate as ItemEnte3_8_, ıtems0_.ItemAuthor as ItemAuthor8_,
ıtems0_.ItemTitle as ItemTitle8_, ıtems0_.ItemDetail as ItemDetail8_,
ıtems0_.ItemPic as ItemPic8_, ıtems0_.ItemMainNews as ItemMain8_8_,
ıtems0_.ItemGroup5 as ItemGroup9_8_, ıtems0_.ItemGroup10 as ItemGroup10_8_,
ıtems0_.ItemFrontpage as ItemFro11_8_, ıtems0_.ItemVisited as ItemVis12_8_,
ıtems0_.ItemProposed as ItemPro13_8_, ıtems0_.ItemVoted as ItemVoted8_,
ıtems0_.ItemScored as ItemScored8_, ıtems0_.ItemDisabled as ItemDis16_8_,
ıtems0_.ItemNewsGroup as ItemNew17_8_ from news.items ıtems0_.
我认为“ı”这个角色有问题
谢谢
...from news.items ıtems0_.
这个问题是最后的句号。这实际上是hibernate生成的sql吗?是的,这是hibernate生成的sql 我想我找到了这个问题的答案。我的电脑的语言设置与英语不同。我将语言设置更改为英语,然后使用Hibernate反向工程从表中创建类。一切都好了