File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes hql with select , where Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hql with select , where " Watch "hql with select , where " New topic
Author

hql with select , where

indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Hi all am trying to get the records with where clause using hql from mysql db, then it shows the exception as

in my java source class..

am using hibernate 3 and mysql 5.1

please help me guys..


thanks ,
Indu
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
my code is ::
Bogdan Baraila
Ranch Hand

Joined: May 23, 2011
Posts: 43
Like the name of the method you use is saying (createSQLQuery) you are not creating a hql query but a native sql query that will apply directly to the database. Try using the createQuery method.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hql with select , where
 
Similar Threads
Invalid MySQL syntax when using 'select new list()'
Can i delete an object based on his reference
sequence generator with mysql
[Resolved]java.util.NoSuchElementException problem after displaying the information from text file
Hibernate HQL Delete query problem