users@glassfish.java.net

Issue ? persitence.xml's property eclipselink.ddl-generation.output-mode

From: <glassfish_at_javadesktop.org>
Date: Mon, 20 Sep 2010 02:44:13 PDT

Hi,

Maybe I've found a bug in Eclipse Link persistence.xml file.
Where is a sample :
[CODE]
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" 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">
        <persistence-unit name="My-PU" transaction-type="JTA">
                <description>My Desc</description>
                <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
                <jta-data-source>jdbc/MySource</jta-data-source>
                <exclude-unlisted-classes>false</exclude-unlisted-classes>
                <properties>
                        <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
                        <property name="eclipselink.logging.level" value="FINEST"/>
                        <!-- see http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29 -->
                        <property name="eclipselink.application-location" value="C:\ddl"/>
                        <property name="eclipselink.create-ddl-jdbc-file-name" value="create.sql"/>
                        <property name="eclipselink.drop-ddl-jdbc-file-name" value="drop.sql"/>
                        <property name="eclipselink.ddl-generation.output-mode" value="both"/>
                </properties>
        </persistence-unit>
</persistence>
[/CODE]

So, you can now try setting "eclipselink.ddl-generation.output-mode" as "database" --> tabes are created. If you set this property to "both", only the sql files are generated. No sql statement are made.

I'm using GlassFish Server Open Source Edition 3.0.1 (build 22)
[Message sent by forum member 'laps']

http://forums.java.net/jive/thread.jspa?messageID=483126