I am new to Seam. I try to start a new Seam 2 Web Project from Eclipse and connect to MySql 5.5 database. Then, I reverse the entities from my database GOBS. Everything is fine, but when I try to use the HQL editor. I got the following error
The HQL Statement select subject from Subject as subject
The error message om.mysql.jdbc.exceptions.jdbc4.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 '.staffinfo staffinfo0_' at line 1
From the Hibernate Dynamic SQL Preview, I found that The db name “GOBS” is repeated. I can run the sql correctly in mysql by removed one GOBS
select staffinfo0_.StaffInfoId as StaffInf1_29_, staffinfo0_.BsSchool_BsSchoolId as BsSchool2_29_, staffinfo0_.StaffCode as StaffCode29_, staffinfo0_.StaffNameChi as StaffNam4_29_, staffinfo0_.StaffNameEng as StaffNam5_29_, staffinfo0_.StaffPw as StaffPw29_, staffinfo0_.StaffType_StaffTypeId as StaffType7_29_ from GOBS.GOBS.staffinfo staffinfo0_
The problem is I don’t how to fix it in Eclipse
Thanks
Eclipse – Indigo Service Release 1 JBoss AS 5.1 Mysql – 5.5 Seam – 2.2
|