openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Schema not dropped using Apache Aries JPA and OpenJPA 2.1
Date Tue, 25 Oct 2011 05:29:33 GMT
Hi,

I have deployed successfully a Aries JPA project (using Aries JPA 0.3)
on Karaf but my DB is not dropped or records removed from the table
when the following option is set in the persistence file

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
             version="2.0">

    <persistence-unit name="reportincident" transaction-type="JTA">

        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
        <jta-data-source>osgi:service/jdbc/reportincidentdb</jta-data-source>

        <class>org.test.model.Incident</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>

        <properties>
            <property name="openjpa.jdbc.SynchronizeMappings"

value="buildSchema(SchemaAction='dropDB,deleteTableContents')"/>
            <property name="openjpa.Log"
                      value="DefaultLevel=INFO, Runtime=INFO,
Tool=INFO, SQL=TRACE"/>
            <property name="openjpa.jdbc.DBDictionary"
                      value="h2(useSchemaName=true)"/>
            <property name="openjpa.jdbc.Schema"
                      value="REPORT"/>
        </properties>

    </persistence-unit>
</persistence>

Does anybody knows the reason ?

Regards,

Charles Moulliard

Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard

Mime
View raw message