• 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"
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!