Paulius Matulionis
Paulius Matulionis

Reputation: 23415

Auto Update OpenJPA tables

Is there a way to tell OpenJPA to automatically update tables in the database on application deployment?

I know that hibernate has a property:

<prop key="hibernate.hbm2ddl.auto">update</prop>

Is there something similar in OpenJPA?

Upvotes: 1

Views: 549

Answers (1)

seba.wagner
seba.wagner

Reputation: 3860

Yes:

<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>

http://openjpa.apache.org/builds/2.2.0/apache-openjpa/docs/ref_guide_conf_jdbc.html#openjpa.jdbc.SynchronizeMappings

Sebastian

Upvotes: 2

Related Questions