Community
Participate
Working Groups
It would be useful to allow SQL to be appended to the end of CREATE TABLE statements. One use for this is as follows: By default, MySQL 5 installs with a non-transactional engine as the default engine on Unix servers. When this engine is enabled, database transactions do not work for tables that are created with default syntax. Tables that are transactional can be created by appending "engine=InnoDB" to the end of the CREATE TABLE statement. e.g. CREATE TABLE MyTable (id INTEGER) engine=InnoDB This functionality would be useful to anyone that wanted to make use of transactions on a MySQL server they could not control and could potentially allow other similar features to be used on other databases. Because this feature does not currently exist, we are forced to require any MySQL database we run our testing on to have InnoDB as the default engine. This potentially causes problems in a community such as Eclipse because the EclipseLink group will not necessarily be able to own the servers testing is running on.
Changed version to unspecified
Updating priority due to revised bug categorization process. See the following page for details: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines#Priority_and_Target_Milestone If you feel the updated priority is incorrect, please send an email to eclipselink-users@eclipse.org.
Design doc available at: http://wiki.eclipse.org/EclipseLink/DesignDocs/214519 feedback appreciated
Created attachment 180517 [details] proposed changes
Created attachment 181741 [details] proposed fix with testing
Created attachment 183254 [details] proposed patch with testing
Created attachment 183294 [details] patch with tests
checked into 2.2 at revision 8512 reviewed by James Sutherland Adds creation-suffix tag to eclipselink-orm.xml tables, and a new "eclipselink.ddl-generation.table-creation-suffix" persistence property, both of which allow string values to be appended to CREATE TABLE statements.
*** Bug 259039 has been marked as a duplicate of this bug. ***
Chris, Should a corresponding annotation be created for this feature? I know you can't just add an element to the existing javax.persistence table annotations, but maybe a new @CreationSuffix annotation? I was under the impression that EclipseLink is trying to have the same xml and annotation metadata available.
EclipseLink is trying to have the same xml and annotation metadata available, but there are a few exceptions. Implementing this one as an annotation would require yet another EclipseLink specific annotation. It would have added confusion and complexity, as such an annotation would only benifit DDL generation, but still have to contain most of the information already avaible in the @Table annotation. It was decided to leave this out of this feature, as it could be added in later if there was a demand or need for it.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink