It is one of the first things I tried, I got this exception: Caused by: org.apache.openjpa.lib.util.ParseException: There was an error while setting up the configuration plugin option "SynchronizeMappings". The plugin was of type "org.apache.openjpa.jdbc.meta.MappingTool". Setter methods for the following plugin properties were not available in that type: [DropTables]. Possible plugin properties are: [ACTIONS, ACTION_ADD, ACTION_BUILD_SCHEMA, ACTION_DROP, ACTION_EXPORT, ACTION_IMPORT, ACTION_REFRESH, ACTION_VALIDATE, DropUnusedComponents, ForeignKeys, IgnoreErrors, Indexes, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY, MappingWriter, MetaDataFile, PrimaryKeys, ReadSchema, Repository, SCHEMA_ACTION_NONE, SchemaAction, SchemaGroup, SchemaTool, SchemaWriter, Sequences]. Ensure that your plugin configuration string uses key values that correspond to setter methods in the plugin class. at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:352) at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:280) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:153) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:127) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:164) ... 17 more
I also tried different combinations but to no avail... Abe White wrote: > >> Unfortunately, we don't have any automatic drop-table feature, but >> I agree it would be handy (you might want to make a JIRA report >> with the suggestion). > > Note that the "SynchronizeMappings" property allows you to use all > the arguments of the mappingtool. So you can try something like: > > buildSchema(SchemaAction=refresh, DropTables=true) > > Theoretically, that will drop unused columns and tables while adding > any new columns and tables needed for your mappings. If you try it, > let us know how it works out. > _______________________________________________________________________ > Notice: This email message, together with any attachments, may contain > information of BEA Systems, Inc., its subsidiaries and affiliated > entities, that may be confidential, proprietary, copyrighted and/or > legally privileged, and is intended solely for the use of the individual > or entity named in this message. If you are not the intended recipient, > and have received this message in error, please immediately return this > by email and then delete it. > > -- View this message in context: http://www.nabble.com/Perform-automatic-drop-and-create-db-schema-tf2909915.html#a8131374 Sent from the open-jpa-dev mailing list archive at Nabble.com.