This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft 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


Win a copy of Java 8 in Action this week in the Java 8 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



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with showing records in hibernate
 
Similar Threads
Newbie got stuck in Hibernate "Hello World"
Not able to update or save a object to database. please help.
SQLGrammarException
SEVERE: Duplicate entry '1' for key 'PRIMARY'
Problems with hibernate and mysql?