Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/UserGuide/JPA/Advanced JPA Development/Schema Generation/Appending strings to CREATE TABLE statements"
< EclipseLink | UserGuide | JPA | Advanced JPA Development | Schema Generation
m |
|||
Line 15: | Line 15: | ||
>>>>>> THIS PAGE IS IN PROGRESS. PLEASE SEE DISCUSSION PAGE. <<<<<< | >>>>>> THIS PAGE IS IN PROGRESS. PLEASE SEE DISCUSSION PAGE. <<<<<< | ||
+ | |||
+ | As described below, you can append a string to the end of a CREATE TABLE statement when generating a DDL. Appending the string only affects the DDL generation. It does not affect any other runtime behavior. | ||
+ | |||
+ | Use the persistence unit property <tt>eclipselink.ddl-generation.table-creation-suffix</tt> to append a string the end of a CREATE TABLE statement. | ||
+ | |||
+ | |||
+ | |||
===Example=== | ===Example=== | ||
Assuming it has an ID annotated, an <tt>eclipselink-orm.xml</tt> file containing... | Assuming it has an ID annotated, an <tt>eclipselink-orm.xml</tt> file containing... |
Revision as of 13:07, 2 February 2011
EclipseLink JPA
EclipseLink | |
Website | |
Download | |
Community | |
Mailing List • Forums • IRC • mattermost | |
Issues | |
Open • Help Wanted • Bug Day | |
Contribute | |
Browse Source |
Key API
Appending Strings to CREATE TABLE Statements
>>>>>> THIS PAGE IS IN PROGRESS. PLEASE SEE DISCUSSION PAGE. <<<<<<
As described below, you can append a string to the end of a CREATE TABLE statement when generating a DDL. Appending the string only affects the DDL generation. It does not affect any other runtime behavior.
Use the persistence unit property eclipselink.ddl-generation.table-creation-suffix to append a string the end of a CREATE TABLE statement.
Example
Assuming it has an ID annotated, an eclipselink-orm.xml file containing...
<entity class="Comment"> <table name="DDL_COMMENT" creation-suffix="COMMENT='User Comment Table'"/> </entity>
...results in the following creation statement:
CREATE TABLE DDL_COMMENT (ID INTEGER) COMMENT='User Comment Table'
If it is coupled with the following persistence property...
<property name="eclipselink.ddl.default-table-suffix" value="engine=InnoDB"/>
it results in the following creation statement:
CREATE TABLE DDL_COMMENT (ID INTEGER) COMMENT='User Comment Table' engine=InnoDB