Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hql with select , where

 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my code is ::
 
Bogdan Baraila
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic