Hello everybody,
I want to configure the openjpa.jdbc.SynchronizeMappings property in my
persistence.xml in a way that it...
1. ... drops all tables in the database schema (drop whole schema)
2. ... recreates the schema
3. ... builds tables for all entity classes
My Intention is, also to clear tables that are not known in the current
persistence unit including openjpa tables which may have been generated before.
In Ant I solved it that way:
Theoretically (according to te documentation) it should work with the following
property configuration in the persistence.xml:
But it seems, that "OpenjpaTables" is not known as attribute, because I get the
following error:
Exception in thread "main" org.apache.openjpa.persistence.PersistenceException: 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_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META,
MODE_NONE, MODE_QUERY, MappingWriter, MetaDataFile, PrimaryKeys, ReadSchema,
Repository, SCHEMA_ACTION_NONE, SchemaAction, SchemaGroup, SchemaTool,
SchemaWriter, Sequences].
Is "OpenjpaTables" just not available or has it another name for
persistence.xml properties?
--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss
für nur 17,95 Euro/mtl.!*
http://dslspecial.gmx.de/freedsl-aktionspreis/?ac=OM.AD.PD003K11308T4569a