Monday, February 2, 2015

Hibernate: Automatically creating/updating the db tables based on entity classes

!-- Drop and re-create the database schema on startup -->
        <property name="hbm2ddl.auto">create</property>
or,  
 <property name="hbm2ddl.auto">update</property>

or,
<prop key="hibernate.hbm2ddl.auto">create</prop>
or, 

<property name="hbm2ddl.auto" value="create"/>

No comments:

Post a Comment