openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcin Kwapisz" <>
Subject RE: Propblem with OpenEJB + Toplink unit tests
Date Tue, 05 Aug 2008 07:01:19 GMT
>      <properties>
>        <property name=""
> value="org.eclipse.persistence.platform.database.HSQLPlatform"/>
>        <property name="eclipselink.ddl-generation" value="create-
> tables"/>
>        <property name="eclipselink.ddl-generation.output-mode"
> value="database"/>
>      </properties>
[Marcin Kwapisz] 
Hi David,

Properties in main persistence.xml (for toplink) are almost the same. I have set generation.output-mode
to both to verify ddl statements. Database platform is detected automatically (check the log)
so you can skip that property.
The following properties are for toplink, openjpa and hibernate respectively. As you can see,
Hibernate was the less demanding from "unexperienced" user like me.

      <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
      <property name="toplink.logging.level" value="FINEST"/>
      <property name="toplink.ddl-generation.output-mode" value="both"/>
      <property name="" value="pl.zsk.samples.ejbservice.OpenEJBServerPlatform"/>

            <!-- does not create foreign keys, creates schema and deletes content of a
database (deleteTableContents - foreign keys are created twice???), use dropDB instead -->
            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(foreignKeys=true,schemaAction='dropDB,add')"/>
            <!--Resolves the problem with foreign key integrity - joined entities are persisted
sometimes in wrong order??? (verify it)-->
            <property name="openjpa.jdbc.SchemaFactory" value="native(foreignKeys=true)"
            <!--Create foreign keys-->
            <property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=restrict,
            <property name="openjpa.Log" value="DefaultLevel=TRACE,SQL=TRACE" />

            <property name="" value="create-drop"/>
            <property name="hibernate.transaction.manager_lookup_class"

Marcin Kwapisz
Division of Computer Networks
Technical Univeristy of Lodz, Poland

View raw message