File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

select in hibernate

 
Atul Darne
Ranch Hand
Posts: 118
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have acheived adding contents to a database table by using hibernate xml hbm file, now i wish to search any user in it - i am stucked with with an error in the code




iam having the following function



cfg file



patient.hbm.xml



i get the below error

when i do a select query on the table


 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what your Patient class has?
 
Atul Darne
Ranch Hand
Posts: 118
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vijitha ,

I am adding the class

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String SQL_QUERY ="from patientdetails.id,patientdetails.firstname";


I think it should be

When you write HQL, you concentrate on Objects and its properties without concerning about the database
 
Atul Darne
Ranch Hand
Posts: 118
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kunal,

thanks it worked - i made the following changes

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic