It is said that with the use of org.apache.openjpa.jdbc.ant.MappingToolTask it is possible to synchronize domain models classes with db schema. So by having following script as an Ant task i was able to add new columns to the given databases on the persistance.xml.
<target>
<taskdef name="mappingtool" classpathref="maven.compile.classpath" classname="org.apache.openjpa.jdbc.ant.MappingToolTask" />
<mappingtool schemaAction="refresh" >
</mappingtool>
</target>
This script adds new columns every time i add a new attribute to the domain class. but it wont remove the corresponding column if i remove them from the domain class. Is there anyway to archive the synchronization for both (add/remove) with an single ant script?