Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/JPA/Advanced JPA Development/Schema Generation/Appending strings to CREATE TABLE statements"

Line 4: Line 4:
 
|eclipselink=y
 
|eclipselink=y
 
|eclipselinktype=JPA
 
|eclipselinktype=JPA
|api=y
 
|apis=[http://www.eclipse.org/eclipselink/api/latest/eclipse/persistence/annotations/CascadeOnDelete.html CascadeOnDelete]
 
 
}}  
 
}}  
  
Line 13: Line 11:
 
>>>>>> THIS PAGE IS IN PROGRESS. PLEASE SEE DISCUSSION PAGE. <<<<<<
 
>>>>>> THIS PAGE IS IN PROGRESS. PLEASE SEE DISCUSSION PAGE. <<<<<<
 
===Example===
 
===Example===
An EclipseLink-orm.xml file with the following tag (assuming it has an id annotated):
+
Assuming it has an ID annotated, an <tt>eclipselink-orm.xml</tt> file containing...
 
<pre><entity class="Comment">
 
<pre><entity class="Comment">
 
   <table name="DDL_COMMENT" creation-suffix="COMMENT='User Comment Table'"/>
 
   <table name="DDL_COMMENT" creation-suffix="COMMENT='User Comment Table'"/>
 
</entity></pre>
 
</entity></pre>
  
will result in the creation statement:
+
...results in the following creation statement:
 
<pre>
 
<pre>
 
   CREATE TABLE DDL_COMMENT (ID INTEGER) COMMENT='User Comment Table'
 
   CREATE TABLE DDL_COMMENT (ID INTEGER) COMMENT='User Comment Table'
 
</pre>
 
</pre>
  
Coupled with persistence property:
+
If it is coupled with the following persistence property...
  
 
<pre><property name="eclipselink.ddl.default-table-suffix" value="engine=InnoDB"/></pre>
 
<pre><property name="eclipselink.ddl.default-table-suffix" value="engine=InnoDB"/></pre>
  
will result in the creation statement:
+
it results in the following creation statement:
 
<pre>
 
<pre>
 
   CREATE TABLE DDL_COMMENT (ID INTEGER) COMMENT='User Comment Table' engine=InnoDB
 
   CREATE TABLE DDL_COMMENT (ID INTEGER) COMMENT='User Comment Table' engine=InnoDB

Revision as of 11:53, 1 February 2011

EclipseLink JPA

Eclipselink-logo.gif
EclipseLink
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source


Appending Strings to CREATE TABLE Statements

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

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

Eclipselink-logo.gif
Version: 2.2.0 DRAFT
Other versions...

Copyright © Eclipse Foundation, Inc. All Rights Reserved.