Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate basic Program

 
vendikonda sravan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

i wrote a simple hibernate Program got no exceptions but i'm still not able to see the database updated.
what might possible be wronge please help .

Thanks
sravan V
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you commit your transaction?
 
vendikonda sravan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i have here is the code
 
Ares Fergusson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try first:

session.save(emp);

just before commiting the transaction(after line 31). I think it will work, if you've done your mappings right.
 
Varun Phadnis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are setting hbm2ddl property then try setting it to "update"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic