Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » eclipselink.ddl-generation - best practice
eclipselink.ddl-generation - best practice [message #650255] Sun, 23 January 2011 18:40 Go to next message
Tori  is currently offline Tori
Messages: 18
Registered: July 2009
Junior Member
Hi,

What is best practice for the eclipselink.ddl-generation property.

Should you run a script first (before application 1st run) to create all tables etc and leave this set to NONE or is it ok to leave it at create / create-table for good?

I am guessing that leaving it set and the resultant exceptions will have some negative / performance impact? What is normal best practice?

Thanks
T
Re: eclipselink.ddl-generation - best practice [message #650408 is a reply to message #650255] Mon, 24 January 2011 13:10 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

You could leave it to "create-tables" or even "drop-and-create-tables" during development if your model is frequently changing.

During production I would turn if off and either switch to maintaining the tables with a script, or run it once to generate the production schema. Normally a production schema would be maintained by a DBA.

But it depends on your application. If your application can be downloaded and installed by many different users, then it may make sense to leave DDL generation on to avoid the user having to create the database. A few failed exceptions at startup should not have a big impact.


James : Wiki : Book : Blog : Twitter
Re: eclipselink.ddl-generation - best practice [message #650439 is a reply to message #650408] Mon, 24 January 2011 16:12 Go to previous message
Tori  is currently offline Tori
Messages: 18
Registered: July 2009
Junior Member
Many thanks,,,
Previous Topic:Getting a JDBC Connection from an EntityManager returns null in EclipseLink 2.0.2
Next Topic:Beginner setup problems
Goto Forum:
  


Current Time: Sat Aug 02 00:34:21 EDT 2014

Powered by FUDForum. Page generated in 0.01481 seconds