我有一个名为 Items 的表。当我尝试在 MyEclipse 中执行“Hibernate Reverse Engineering”并运行程序时,出现以下错误:
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
我写show_sql = true
在我的 hibernate.cfg.xml 上。现在我得到了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_.
我认为字符“ı”有问题。
谢谢。