wood burning stoves 2.0
The moose likes Object Relational Mapping and the fly likes problem with showing records in hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "problem with showing records in hibernate" Watch "problem with showing records in hibernate" New topic
Author

problem with showing records in hibernate

shankhas sanyal
Ranch Hand

Joined: Jun 15, 2008
Posts: 45
hi all,
I am learning hibernate from scratch. so please guide me if i may be wrong.

i have a simple console based hibernate application that is being run on netbeans ide.

my hibernate.cfg.xml :




my emp.hbm.xml


my emp.java





my main.java (contains main method)



i have 5 records in the emp table. when i run this program. it show 5 times null.

output:






can anyone suggest how can i show the records and please guide me.

thanks
Shankha


I love this place!
shankhas sanyal
Ranch Hand

Joined: Jun 15, 2008
Posts: 45
i fixed this problem on my own with this piece of code



 
 
subject: problem with showing records in hibernate