Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database record deleted when deploying new ear file

 
Damodar Mukhopadhyay
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am new to JPA, Working with Hibernate JPA.

I am surprised as the records of my database are deleted when I deploy a new ear file in JBoss.
The ear contains JPA entity beans.


Pleae suggest me what should i do If I want to keep the new records as well the old records?


Thank You...


Regards.
Damodar
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How have you configured Hibernate? If you are using the DDL creation stuff make sure its set to update an not create (e.g. hibernate.hbm2ddl.auto=update).
 
Damodar Mukhopadhyay
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You...
Its working now
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic