-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Dynamic sql in Eclipse problem
PostPosted: Wed Dec 07, 2011 1:41 am 
Newbie

Joined: Tue Dec 06, 2011 11:45 pm
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.