File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Database record deleted when deploying new ear file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Database record deleted when deploying new ear file" Watch "Database record deleted when deploying new ear file" New topic
Author

Database record deleted when deploying new ear file

Damodar Mukhopadhyay
Ranch Hand

Joined: Jan 15, 2007
Posts: 98

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


SCJP 1.5, SCWCD 1.4, SCBCD 5.0, next SCDJWS...
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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).


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Damodar Mukhopadhyay
Ranch Hand

Joined: Jan 15, 2007
Posts: 98
Thank You...
Its working now
 
jQuery in Action, 2nd edition
 
subject: Database record deleted when deploying new ear file