• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate: Data is not getting saved

 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a sample Hibernate code to insert data, by looking at one of the tutorials found on google. Interesting thing is as I open MySQL sql editor, I am finding the column names but the data is not found. I am struggling with it since two days.My issues are
1. Data is not being displayed on mysql sql editor. I tried the same with postgres too. The same issue.
2. I have given show_sql as true in hibernate.cfg.xml file, I am not able to see the sql query


As I have put the debugger statements, I am able to see all the statements as below

Environment
OS: Ubuntu
Database: MySQL
ORM tool: Hibernate
IDE eclipse
 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The issue is resolved. I have added session.flush() before session.close(). Now the data is displayed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic