Appending Strings to CREATE TABLE Statements

>>>>>> THIS PAGE IS IN PROGRESS. PLEASE SEE DISCUSSION PAGE. <<<<<<

You can append a string to the end of a CREATE TABLE statement when generating a DDL. This can be useful, for example, to create tables that are transactional, by appending engine=InnoDB to the end of the creation statement. This specifies that the MySQL InnoDB storage engine will be used.

Appending the string only affects the DDL generation. It does not affect any other runtime behavior.

You can specify strings using persistence unit properties or session properties to apply to every table in that context. Specify strings in eclipselink-orm.xml to apply to individual tables.

Use the persistence unit property eclipselink.ddl-generation.table-creation-suffix to append a string, as shown in the example below.

Example

Assuming it has an ID annotated, an eclipselink-orm.xml file containing...