我使用epanel和jpa一起使用。 在我的persistence.xml中,我定義了生成一個create.sql文件。該文件將被生成,但缺少';' - 每個sql語句的分隔符。通過eclipseLink生成sql的問題 - 缺少分隔符
是否有可能在persistence.xml中定義分隔符或以其他方式?
實施例的persistence.xml:
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<class>de.company.project.models.User</class>
<properties>
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.application-location" value="/sql" />
<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="sql-script"/>
</properties>
實施例生成的SQL文件:
CREATE TABLE app_user (
ID INTEGER NOT NULL,
last_name VARCHAR(50) NOT NULL,
username VARCHAR(15) NOT NULL,
user_password VARCHAR(50) NOT NULL,
first_name VARCHAR(50) NOT NULL,
PRIMARY KEY (ID))
CREATE TABLE SEQUENCE (
SEQ_NAME VARCHAR(50) NOT NULL,
SEQ_COUNT DECIMAL(38),
PRIMARY KEY (SEQ_NAME))
INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT)
values ('SEQ_GEN_TABLE', 0)
@editors:感謝破壞的persistence.xml -.- – 2010-08-31 07:56:48