Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

data not persisted using hibernate spring integration

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am trying to integrate vaadin with hibernate and spring. Data is getting persisted for the first time when I run my application. But second time when I run the application, data gets deleted from DB(mysql) table. Please help me to solve the issue.

Following is all related code:-

Domain class user



DaoImpl class


Spring config. file(applicationContext class)


Vaadin main class


Please provide some input to solve this issue.I am using hibernate version 3.6.0 and Spring version 3.0.4 and MySQL as Database.

Regards,
Vikram
 
Vikram Kohli
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hurray........I have found it..........

commenting out <prop key="hibernate.hbm2ddl.auto">create</prop> in spring config. have done the thing for me.

Vikram
 
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic