• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to save object

 
Nagaraju Mulinti
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am unable to save new object using Hibernate.
I just created new object and saved it.And while saving it, I do not get any issue.But after saving it, I checked it in DB,but there is no record in the DB.Plzzzz help me.

I am using Session.save(object) in my code..

Thanks in advance..
 
fred rosenberger
lowercase baba
Bartender
Posts: 12263
36
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum. This forum is for asking questions about the JavaRanch itself, not technical question.

Your post will be moved to a more appropriate venue soon. Look for followups and answers there.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This part of the forum is for questions about the site, not on programming.

I am moving this to the correct location, Object Relational Mapping. Look for the click here link above to go where it has been moved.

Eric
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nagaraju,

There was a similar discussion some days back here
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Provide your hibernate mapping file and code that you have written to
save the object.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nagaraju Mulinti:
Hi,

I am unable to save new object using Hibernate.
I just created new object and saved it.And while saving it, I do not get any issue.But after saving it, I checked it in DB,but there is no record in the DB.Plzzzz help me.

I am using Session.save(object) in my code..

Thanks in advance..


Have you commiting the transaction you perform the save in? Have a read of this.
[ November 24, 2008: Message edited by: Paul Sturrock ]
 
Nagaraju Mulinti
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After saving object. I am calling Session.flush() as well.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
....and are you commiting your transaction?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic