Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » ddl-generation separator
ddl-generation separator [message #384365] Mon, 29 December 2008 11:24 Go to next message
Neuhauser Bernhard is currently offline Neuhauser BernhardFriend
Messages: 4
Registered: July 2009
Junior Member
Hi again,

Is it possible to specify a separator for the ddl file generation? (for
both output files: drop.sql and create.sql)

EclipseLink generates files like:

Personally i expected that it should be like:

I hoped that the ddl generator would add such separators depending on
the chosen targetDatabase. Is there a way to convince eclipseLink to add
; at the end of every sql statement?

Re: ddl-generation separator [message #384366 is a reply to message #384365] Mon, 29 December 2008 12:47 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 809
Registered: July 2009
Senior Member
You can extend the database class that is being used, and adapt its behavior to your needs.
Re: ddl-generation separator [message #385167 is a reply to message #384365] Mon, 29 December 2008 14:22 Go to previous messageGo to next message
Gordon Yorke is currently offline Gordon YorkeFriend
Messages: 78
Registered: July 2009
There should be a property for this but there is not, please file an

You can cause the ddl to be generated in the same manner as EclipseLink
using the native SchemaManager.

DatabaseSession session = entityManagerFactory.getServerSession();
SchemaManager mgr = new SchemaManager(session)
mgr.outputCreateDDLToFile(createDDLFilePath); // set create ddl file name
mgr.outputDropDDLToFile(dropDDLFilePath);// sets drop ddl file name
mgr.setCreateSQLFiles(true); // writes statement terminator
mgr.replaceDefaultTables(true, true); // generates both drop and create ddl

Re: ddl-generation separator [message #385177 is a reply to message #384365] Sun, 11 January 2009 12:44 Go to previous message
Frank Schwarz is currently offline Frank SchwarzFriend
Messages: 25
Registered: July 2009
Location: Dresden
Junior Member
There is already an enhancement request for this feature:

If you use apache-ant, you might consider adding these lines to your build
<fixcrlf srcdir="${basedir}/build/sql" />
<replace dir="${basedir}/build/sql" token="${line.separator}"
value=";${line.separator}" summary="true" />

-- Frank
Previous Topic:EclipseLink vs Hibernate
Next Topic:Source code for javax.persistence
Goto Forum:

Current Time: Wed Dec 02 06:59:50 GMT 2015

Powered by FUDForum. Page generated in 0.02128 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software