aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
SEVERE: Duplicate entry '1' for key 'PRIMARY'
Not able to update or save a object to database. please help.
Problems with hibernate and mysql?
SQLGrammarException
Newbie got stuck in Hibernate "Hello World"