This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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



 
Have you checked out Aspose?
 
subject: problem with showing records in hibernate
 
It's not a secret anymore!