• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

select in hibernate  RSS feed

 
Ranch Hand
Posts: 119
Java Opera Oracle
  • 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


 
Bartender
Posts: 4097
63
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what your Patient class has?
 
Atul Darne
Ranch Hand
Posts: 119
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vijitha ,

I am adding the class

 
Ranch Hand
Posts: 622
  • 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: 119
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kunal,

thanks it worked - i made the following changes

 
See where your hand is? Not there. It's next to this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!