I create a database in MySQL (4.0.20)
I create PERSON table
I develop the coreesponding Entity
@Entity
@Table(name = "PERSON")
public class PersonEntity implements Serializable {
...
}
I deploy the jar and test the creation :
...
entityManager.persist(personEntity);
...
It works.
But when I undeploy in EclipseIDE, the data in database are deleted.
Can some one explain me why it is deleted, and show me how to avoid this ?
thank U.
Check your persistence.xml, you probably have the create-drop option