[nobug] test fixes:
-clearly separated jpa21 vs jpa22 tests
-fixed typos
-stabilization for running against MySQL 5.5

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/InheritanceSystem.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/InheritanceSystem.java
index 9a02a77..d337815 100644
--- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/InheritanceSystem.java
+++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/InheritanceSystem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 1998, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017 Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -117,14 +117,7 @@
             try {
                 if (session.getPlatform().supportsUniqueKeyConstraints()
                         && !session.getPlatform().requiresUniqueConstraintCreationOnTableCreate()) {
-                    if (session.getPlatform().isMySQL()) {
-                        session.executeNonSelectingSQL("Alter TABLE PROJECT_WORKER_BATCH DROP FOREIGN KEY PROJECT_WORKER_BATCH_HD");
-                        session.executeNonSelectingSQL("Alter TABLE PROJECT_BATCH DROP FOREIGN KEY PROJECT_WORKER_BATCH_FK");
-                        session.executeNonSelectingSQL("Alter TABLE ALLIGATOR DROP FOREIGN KEY FK_ALLIGATOR_VICTIM_ID");
-                        session.executeNonSelectingSQL("Alter TABLE PERSON2 DROP FOREIGN KEY PERSON2_PERSON2_FRND");
-                        session.executeNonSelectingSQL("Alter TABLE PERSON2 DROP FOREIGN KEY PERSON2_PERSON2_REP");
-                        session.executeNonSelectingSQL("Alter TABLE PERSON2 DROP FOREIGN KEY PERSON2_PERSON2_BS");
-                    } else {
+                    if (!session.getPlatform().isMySQL()) {
                         session.executeNonSelectingSQL("Alter TABLE PROJECT_WORKER_BATCH DROP CONSTRAINT PROJECT_WORKER_BATCH_HD");
                         session.executeNonSelectingSQL("Alter TABLE PROJECT_BATCH DROP CONSTRAINT PROJECT_WORKER_BATCH_FK");
                         session.executeNonSelectingSQL("Alter TABLE ALLIGATOR DROP CONSTRAINT FK_ALLIGATOR_VICTIM_ID");
diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/insurance/InsuranceSystem.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/insurance/InsuranceSystem.java
index 33fd959..6323073 100644
--- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/insurance/InsuranceSystem.java
+++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/insurance/InsuranceSystem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 1998, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017 Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -15,6 +15,7 @@
 import org.eclipse.persistence.exceptions.*;
 import org.eclipse.persistence.sessions.*;
 import org.eclipse.persistence.descriptors.ClassDescriptor;
+import org.eclipse.persistence.logging.SessionLog;
 import org.eclipse.persistence.queries.*;
 import org.eclipse.persistence.testing.framework.*;
 import org.eclipse.persistence.tools.schemaframework.*;
@@ -34,6 +35,9 @@
     public void createTables(DatabaseSession session) {
         if (!SchemaManager.FAST_TABLE_CREATOR) {
             try {
+                if (session.getPlatform().isMySQL()) {
+                    session.executeNonSelectingCall(new SQLCall("SET foreign_key_checks = 0"));
+                }
                 session.executeNonSelectingCall(new SQLCall("drop table CHILDNAM"));
                 session.executeNonSelectingCall(new SQLCall("drop table INS_ADDR"));
                 session.executeNonSelectingCall(new SQLCall("drop table INS_PHONE"));
@@ -43,7 +47,13 @@
                 session.executeNonSelectingCall(new SQLCall("drop table POLICY"));
                 session.executeNonSelectingCall(new SQLCall("drop table HOLDER"));
             } catch (Exception e) {
+                session.getSessionLog().logThrowable(SessionLog.WARNING, e);
+            } finally {
+                if (session.getPlatform().isMySQL()) {
+                    session.executeNonSelectingCall(new SQLCall("SET foreign_key_checks = 1"));
+                }
             }
+
         }
         new InsuranceTableCreator().replaceTables(session);
     }
diff --git a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/advanced-ddl-orm.xml b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/advanced-ddl-orm.xml
index 5393777..dd26398 100644
--- a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/advanced-ddl-orm.xml
+++ b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/advanced-ddl-orm.xml
@@ -23,16 +23,16 @@
                 <temporal>DATE</temporal>
                 <collection-table  name="JPA21_XML_DDL_RUNNER_ACS">
                     <join-column name="ATHLETE_ID"/>
-                    <foreign-key name="XMLAccomplistments_Foreign_Key" foreign-key-definition="FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
+                    <foreign-key name="FK_JPA21_XMLAccomplishments" foreign-key-definition="FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
                 </collection-table>
             </element-collection>
             <element-collection name="endorsements">
                 <map-key-join-column name="ENDORSER_ID"/>
-                <map-key-foreign-key name="XMLEndorsements_Key_Foreign_Key" foreign-key-definition="FOREIGN KEY (ENDORSER_ID) REFERENCES JPA_XML_DDL_ENDORSER (ID)"/>
+                <map-key-foreign-key name="FK_JPA21_XMLEndorsements_Key" foreign-key-definition="FOREIGN KEY (ENDORSER_ID) REFERENCES JPA21_XML_DDL_ENDORSER (ID)"/>
                 <column name="ENDORSEMENT"/>
                 <collection-table name="JPA21_XML_DDL_ENDORSEMENTS">
                     <join-column name="ATHLETE_ID"/>
-                    <foreign-key name="XMLEndorsements_Foreign_Key" foreign-key-definition="FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
+                    <foreign-key name="FK_JPA21_XMLEndorsements" foreign-key-definition="FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
                 </collection-table>
             </element-collection>
         </attributes>
@@ -43,7 +43,7 @@
             <id name="id">
                 <generated-value strategy="TABLE" generator="XML_UTENSIL_ID_GENERATOR"/>
                 <table-generator name="XML_UTENSIL_ID_GENERATOR" table="JPA21_XML_PK_SEQ" pk-column-name="XML_SEQ_NAME" value-column-name="XML_SEQ_COUNT"  pk-column-value="XML_UTENSIL_SEQ">
-                    <index name="XML_TABLE_GENERATOR_INDEX" column-list="XML_SEQ_COUNT,XML_SEQ_NAME"/>
+                    <index name="INDEX_JPA21_XML_TABLE_GENERATOR" column-list="XML_SEQ_COUNT,XML_SEQ_NAME"/>
                 </table-generator>
             </id>
             <basic name="serialTag">
@@ -53,7 +53,7 @@
     </mapped-superclass>
 
     <entity name="XMLRunner" class="Runner">
-        <table name="JPA21_XML_DLL_RUNNER"/>
+        <table name="JPA21_XML_DDL_RUNNER"/>
         <inheritance strategy="JOINED"/>
         <convert attribute-name="accomplishments.key" converter="org.eclipse.persistence.testing.models.jpa21.advanced.converters.AccomplishmentConverter"/>
         <convert attribute-name="accomplishments" converter="org.eclipse.persistence.testing.models.jpa21.advanced.converters.DateConverter"/>
@@ -66,15 +66,15 @@
                 <convert converter="org.eclipse.persistence.testing.models.jpa21.advanced.converters.GenderConverter"/>
             </basic>
             <one-to-many name="shoes" mapped-by="runner">
-                <map-key-join-column name="TAG_IG"/>
-                <map-key-foreign-key name="XMLRunner_ShoeTag_Foreign_Key" foreign-key-definition="FOREIGN KEY (TAG_ID) REFERENCES JPA21_XML_DDL_SHOE_TAG (ID)"/>
+                <map-key-join-column name="TAG_ID"/>
+                <map-key-foreign-key name="FK_JPA21_XMLRunner_ShoeTag" foreign-key-definition="FOREIGN KEY (TAG_ID) REFERENCES JPA21_XML_DDL_SHOE_TAG (ID)"/>
             </one-to-many>
             <many-to-many name="races">
-                <join-table name="DDL_RUNNERS_RACES">
+                <join-table name="JPA21_XML_DDL_RUNNERS_RACES">
                     <join-column name="RUNNER_ID" referenced-column-name="ID"/>
-                    <foreign-key name="XMLRunners_Races_Foreign_Key" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
+                    <foreign-key name="FK_JPA21_XMLRunners_Races" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
                     <inverse-join-column name="RACE_ID" referenced-column-name="ID"/>
-                    <inverse-foreign-key name="XMLRunners_Races_Inverse_Foreign_Key" foreign-key-definition="FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)"/>
+                    <inverse-foreign-key name="FK_JPA21_XMLRunners_Races_Inverse" foreign-key-definition="FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)"/>
                 </join-table>
             </many-to-many>
             <!-- Currently a convert can not be specified with a column as a -->
@@ -86,7 +86,7 @@
                 <convert converter="org.eclipse.persistence.testing.models.jpa21.advanced.converters.TimeConverter"/>
                 <collection-table name="JPA21_XML_DDL_RUNNER_PBS">
                     <join-column name="RUNNER_ID"/>
-                    <foreign-key name="XML_Runner_PBS_Foreign_Key" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
+                    <foreign-key name="FK_JPA21_XML_Runner_PBS" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
                 </collection-table>
             </element-collection -->
             <embedded name="info">
@@ -100,7 +100,7 @@
     <entity name="XMLSprinter" class="Sprinter">
         <table name="JPA21_XML_DDL_SPRINTER"/>
         <primary-key-join-column name="SPRINTER_ID" referenced-column-name="ID"/>
-        <primary-key-foreign-key name="XML_Sprinter_Foreign_Key" foreign-key-definition="FOREIGN KEY (SPRINTER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
+        <primary-key-foreign-key name="FK_JPA21_XML_Sprinter" foreign-key-definition="FOREIGN KEY (SPRINTER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
     </entity>
 
     <entity name="XMLShoe" class="Shoe">
@@ -111,7 +111,7 @@
             </id>
             <many-to-one name="runner">
                 <join-column name="RUNNER_ID"/>
-                <foreign-key name="XMLShoes_Runner_Foreign_Key" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
+                <foreign-key name="FK_JPA21_XMLShoes_Runner" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
             </many-to-one>
         </attributes>
     </entity>
@@ -159,7 +159,7 @@
             <basic name="name"/>
             <many-to-one name="race">
                 <join-column name="RACE_ID"/>
-                <foreign-key name="XMLOrganizer_Race_Foreign_Key" foreign-key-definition="FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)"/>
+                <foreign-key name="FK_JPA21_XMLOrganizer_Race" foreign-key-definition="FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)"/>
             </many-to-one>
         </attributes>
     </entity>
@@ -170,7 +170,7 @@
             <index column-list="STYLE, COLOR"/>
         </table>
         <secondary-table name="JPA21_XML_FORK_COSTS">
-            <index name="XML_FORK_COSTS_INDEX" column-list="COST, RENTAL_COST"/>
+            <index name="INDEX_JPA21_XML_FORK_COSTS" column-list="COST, RENTAL_COST"/>
         </secondary-table>
         <attributes>
             <basic name="price">
diff --git a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/advanced-orm.xml b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/advanced-orm.xml
index 7f497cf..da6a7f8 100644
--- a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/advanced-orm.xml
+++ b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/advanced-orm.xml
@@ -361,7 +361,7 @@
                 </convert>
             </basic>
             <one-to-many name="shoes" mapped-by="runner">
-                <map-key-join-column name="TAG_IG"/>
+                <map-key-join-column name="TAG_ID"/>
             </one-to-many>
             <many-to-many name="races">
                 <join-table name="RUNNERS_RACES">
diff --git a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/jpa21-xml-ddl-model-source-create.jdbc b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/jpa21-xml-ddl-model-source-create.jdbc
index e6e94a3..f104b23 100644
--- a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/jpa21-xml-ddl-model-source-create.jdbc
+++ b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/jpa21-xml-ddl-model-source-create.jdbc
@@ -1,20 +1,20 @@
 CREATE TABLE JPA21_XML_FORK (ID INTEGER NOT NULL, COLOR VARCHAR(255), SERIAL_TAG VARCHAR(255), STYLE VARCHAR(255), PRIMARY KEY (ID))
-CREATE INDEX INDEX_JPA21_XML_FORK_STYLE_COLOR ON JPA21_XML_FORK (STYLE, COLOR)
+CREATE INDEX INDEX_JPA21_XML_FORK_STYLE_COLOR ON JPA21_XML_FORK (STYLE(15), COLOR(15))
 CREATE TABLE JPA21_XML_FORK_COSTS (ID INTEGER NOT NULL, COST DOUBLE, RENTAL_COST DOUBLE, PRIMARY KEY (ID))
-CREATE INDEX XML_FORK_COSTS_INDEX ON JPA21_XML_FORK_COSTS (COST, RENTAL_COST)
+CREATE INDEX INDEX_JPA21_XML_FORK_COSTS ON JPA21_XML_FORK_COSTS (COST, RENTAL_COST)
 CREATE TABLE JPA21_XML_DDL_ORGANIZER (ID INTEGER NOT NULL, NAME VARCHAR(255), RACE_ID INTEGER, DESCRIPTION VARCHAR(255), UNIQUEIDENTIFIER BIGINT, PRIMARY KEY (ID))
 CREATE TABLE JPA21_XML_DDL_ENDORSER (ID INTEGER NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
 CREATE TABLE JPA21_XML_DDL_RACE (ID INTEGER NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
-CREATE TABLE JPA21_XML_DLL_RUNNER (ID INTEGER NOT NULL, DTYPE VARCHAR(31), AGE INTEGER, F_NAME VARCHAR(255), GENDER VARCHAR(255), L_NAME VARCHAR(255), R_HEALTH VARCHAR(255), R_LEVEL VARCHAR(255), R_STATUS VARCHAR(255), PRIMARY KEY (ID))
+CREATE TABLE JPA21_XML_DDL_RUNNER (ID INTEGER NOT NULL, DTYPE VARCHAR(31), AGE INTEGER, F_NAME VARCHAR(255), GENDER VARCHAR(255), L_NAME VARCHAR(255), R_HEALTH VARCHAR(255), R_LEVEL VARCHAR(255), R_STATUS VARCHAR(255), PRIMARY KEY (ID))
 CREATE TABLE JPA21_XML_DDL_SHOE_TAG (ID INTEGER NOT NULL, TAG VARCHAR(255), PRIMARY KEY (ID))
 CREATE TABLE JPA21_XML_FORK_USER (ID INTEGER NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
-CREATE TABLE JPA21_XML_DDL_SHOE (ID INTEGER NOT NULL, BRAND VARCHAR(255), MODEL VARCHAR(255), SIZE INTEGER, RUNNER_ID INTEGER, TAG_IG INTEGER, PRIMARY KEY (ID))
+CREATE TABLE JPA21_XML_DDL_SHOE (ID INTEGER NOT NULL, BRAND VARCHAR(255), MODEL VARCHAR(255), SIZE INTEGER, RUNNER_ID INTEGER, TAG_ID INTEGER, PRIMARY KEY (ID))
 CREATE TABLE JPA21_XML_DDL_SPRINTER (SPRINTER_ID INTEGER NOT NULL, PRIMARY KEY (SPRINTER_ID))
 CREATE TABLE JPA21_XML_FORK_USES (XMLFork_ID INTEGER, DESCRIP VARCHAR(255))
 CREATE INDEX JPA21_XML_FORK_USES_INDEX ON JPA21_XML_FORK_USES (DESCRIP)
 CREATE TABLE JPA21_XML_FORK_FORK_USERS (FORK_ID INTEGER NOT NULL, FORK_USER_ID INTEGER NOT NULL, PRIMARY KEY (FORK_ID, FORK_USER_ID))
 CREATE INDEX JPA21_XML_FORK_USERS_INDEX ON JPA21_XML_FORK_FORK_USERS (FORK_USER_ID, FORK_ID)
-CREATE TABLE DDL_RUNNERS_RACES (RACE_ID INTEGER NOT NULL, RUNNER_ID INTEGER NOT NULL, PRIMARY KEY (RACE_ID, RUNNER_ID))
+CREATE TABLE JPA21_XML_DDL_RUNNERS_RACES (RACE_ID INTEGER NOT NULL, RUNNER_ID INTEGER NOT NULL, PRIMARY KEY (RACE_ID, RUNNER_ID))
 CREATE TABLE JPA21_XML_DDL_RUNNER_ACS (ATHLETE_ID INTEGER, THE_DATE BIGINT, ACCOMPLISHMENT VARCHAR(255))
 CREATE TABLE JPA21_XML_DDL_ENDORSEMENTS (ATHLETE_ID INTEGER, ENDORSEMENT INTEGER, ENDORSER_ID INTEGER)
 CREATE TABLE JPA21_XML_DDL_RUNNER_PBS (RUNNER_ID INTEGER, TIME VARCHAR(255), DISTANCE VARCHAR(255))
@@ -22,23 +22,23 @@
 # A comment that should be ignored.
     
 ALTER TABLE JPA21_XML_FORK_COSTS ADD CONSTRAINT FK_JPA21_XML_FORK_COSTS_ID FOREIGN KEY (ID) REFERENCES JPA21_XML_FORK (ID)
-ALTER TABLE JPA21_XML_DDL_ORGANIZER ADD CONSTRAINT XMLOrganizer_Race_Foreign_Key FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)
-ALTER TABLE JPA21_XML_DDL_SHOE ADD CONSTRAINT XMLRunner_ShoeTag_Foreign_Key FOREIGN KEY (TAG_ID) REFERENCES JPA21_XML_DDL_SHOE_TAG (ID)
-ALTER TABLE JPA21_XML_DDL_SHOE ADD CONSTRAINT XMLShoes_Runner_Foreign_Key FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
-ALTER TABLE JPA21_XML_DDL_SPRINTER ADD CONSTRAINT XML_Sprinter_Foreign_Key FOREIGN KEY (SPRINTER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA21_XML_DDL_ORGANIZER ADD CONSTRAINT FK_JPA21_XMLOrganizer_Race FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)
+ALTER TABLE JPA21_XML_DDL_SHOE ADD CONSTRAINT FK_JPA21_XMLRunner_ShoeTag FOREIGN KEY (TAG_ID) REFERENCES JPA21_XML_DDL_SHOE_TAG (ID)
+ALTER TABLE JPA21_XML_DDL_SHOE ADD CONSTRAINT FK_JPA21_XMLShoes_Runner FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA21_XML_DDL_SPRINTER ADD CONSTRAINT FK_JPA21_XML_Sprinter FOREIGN KEY (SPRINTER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
 ALTER TABLE JPA21_XML_FORK_USES ADD CONSTRAINT FK_JPA21_XML_FORK_USES_XMLFork_ID FOREIGN KEY (XMLFork_ID) REFERENCES JPA21_XML_FORK (ID)
 ALTER TABLE JPA21_XML_FORK_FORK_USERS ADD CONSTRAINT FK_JPA21_XML_FORK_FORK_USERS_FORK_ID FOREIGN KEY (FORK_ID) REFERENCES JPA21_XML_FORK (ID)
 ALTER TABLE JPA21_XML_FORK_FORK_USERS ADD CONSTRAINT FK_JPA21_XML_FORK_FORK_USERS_FORK_USER_ID FOREIGN KEY (FORK_USER_ID) REFERENCES JPA21_XML_FORK_USER (ID)
-ALTER TABLE DDL_RUNNERS_RACES ADD CONSTRAINT XMLRunners_Races_Inverse_Foreign_Key FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)
-ALTER TABLE DDL_RUNNERS_RACES ADD CONSTRAINT XMLRunners_Races_Foreign_Key FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
-ALTER TABLE JPA21_XML_DDL_RUNNER_ACS ADD CONSTRAINT XMLAccomplistments_Foreign_Key FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
-ALTER TABLE JPA21_XML_DDL_ENDORSEMENTS ADD CONSTRAINT XMLEndorsements_Key_Foreign_Key FOREIGN KEY (ENDORSER_ID) REFERENCES JPA_XML_DDL_ENDORSER (ID)
-ALTER TABLE JPA21_XML_DDL_ENDORSEMENTS ADD CONSTRAINT XMLEndorsements_Foreign_Key FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
-ALTER TABLE JPA21_XML_DDL_RUNNER_PBS ADD CONSTRAINT XML_Runner_PBS_Foreign_Key FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA21_XML_DDL_RUNNERS_RACES ADD CONSTRAINT FK_JPA21_XMLRunners_Races_Inverse FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)
+ALTER TABLE JPA21_XML_DDL_RUNNERS_RACES ADD CONSTRAINT FK_JPA21_XMLRunners_Races FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA21_XML_DDL_RUNNER_ACS ADD CONSTRAINT FK_JPA21_XMLAccomplishments FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA21_XML_DDL_ENDORSEMENTS ADD CONSTRAINT FK_JPA21_XMLEndorsements_Key FOREIGN KEY (ENDORSER_ID) REFERENCES JPA21_XML_DDL_ENDORSER (ID)
+ALTER TABLE JPA21_XML_DDL_ENDORSEMENTS ADD CONSTRAINT FK_JPA21_XMLEndorsements FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA21_XML_DDL_RUNNER_PBS ADD CONSTRAINT FK_JPA21_XML_Runner_PBS FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)
     
     
 CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38), PRIMARY KEY (SEQ_NAME))
 CREATE TABLE JPA21_XML_PK_SEQ (XML_SEQ_NAME VARCHAR(50) NOT NULL, XML_SEQ_COUNT DECIMAL(38), PRIMARY KEY (XML_SEQ_NAME))
-CREATE INDEX XML_TABLE_GENERATOR_INDEX ON JPA21_XML_PK_SEQ (XML_SEQ_COUNT, XML_SEQ_NAME)
+CREATE INDEX INDEX_JPA21_XML_TABLE_GENERATOR ON JPA21_XML_PK_SEQ (XML_SEQ_COUNT, XML_SEQ_NAME)
 INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)
 INSERT INTO JPA21_XML_PK_SEQ(XML_SEQ_NAME, XML_SEQ_COUNT) values ('XML_UTENSIL_SEQ', 0)
diff --git a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/jpa21-xml-ddl-model-source-drop.jdbc b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/jpa21-xml-ddl-model-source-drop.jdbc
index 0a10fc6..0dd7636 100644
--- a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/jpa21-xml-ddl-model-source-drop.jdbc
+++ b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa21-model/jpa21-xml-ddl-model-source-drop.jdbc
@@ -1,25 +1,25 @@
 ALTER TABLE JPA21_XML_FORK_COSTS DROP FOREIGN KEY FK_JPA21_XML_FORK_COSTS_ID
-ALTER TABLE JPA21_XML_DDL_ORGANIZER DROP FOREIGN KEY XMLOrganizer_Race_Foreign_Key
-ALTER TABLE JPA21_XML_DDL_SHOE DROP FOREIGN KEY XMLRunner_ShoeTag_Foreign_Key
-ALTER TABLE JPA21_XML_DDL_SHOE DROP FOREIGN KEY XMLShoes_Runner_Foreign_Key
-ALTER TABLE JPA21_XML_DDL_SPRINTER DROP FOREIGN KEY XML_Sprinter_Foreign_Key
+ALTER TABLE JPA21_XML_DDL_ORGANIZER DROP FOREIGN KEY FK_JPA21_XMLOrganizer_Race
+ALTER TABLE JPA21_XML_DDL_SHOE DROP FOREIGN KEY FK_JPA21_XMLRunner_ShoeTag
+ALTER TABLE JPA21_XML_DDL_SHOE DROP FOREIGN KEY FK_JPA21_XMLShoes_Runner
+ALTER TABLE JPA21_XML_DDL_SPRINTER DROP FOREIGN KEY FK_JPA21_XML_Sprinter
 ALTER TABLE JPA21_XML_FORK_USES DROP FOREIGN KEY FK_JPA21_XML_FORK_USES_XMLFork_ID
 ALTER TABLE JPA21_XML_FORK_FORK_USERS DROP FOREIGN KEY FK_JPA21_XML_FORK_FORK_USERS_FORK_ID
 ALTER TABLE JPA21_XML_FORK_FORK_USERS DROP FOREIGN KEY FK_JPA21_XML_FORK_FORK_USERS_FORK_USER_ID
-ALTER TABLE DDL_RUNNERS_RACES DROP FOREIGN KEY XMLRunners_Races_Inverse_Foreign_Key
-ALTER TABLE DDL_RUNNERS_RACES DROP FOREIGN KEY XMLRunners_Races_Foreign_Key
-ALTER TABLE JPA21_XML_DDL_RUNNER_ACS DROP FOREIGN KEY XMLAccomplistments_Foreign_Key
-ALTER TABLE JPA21_XML_DDL_ENDORSEMENTS DROP FOREIGN KEY XMLEndorsements_Key_Foreign_Key
-ALTER TABLE JPA21_XML_DDL_ENDORSEMENTS DROP FOREIGN KEY XMLEndorsements_Foreign_Key
-ALTER TABLE JPA21_XML_DDL_RUNNER_PBS DROP FOREIGN KEY XML_Runner_PBS_Foreign_Key
+ALTER TABLE JPA21_XML_DDL_RUNNERS_RACES DROP FOREIGN KEY FK_JPA21_XMLRunners_Races_Inverse
+ALTER TABLE JPA21_XML_DDL_RUNNERS_RACES DROP FOREIGN KEY FK_JPA21_XMLRunners_Races
+ALTER TABLE JPA21_XML_DDL_RUNNER_ACS DROP FOREIGN KEY FK_JPA21_XMLAccomplishments
+ALTER TABLE JPA21_XML_DDL_ENDORSEMENTS DROP FOREIGN KEY FK_JPA21_XMLEndorsements_Key
+ALTER TABLE JPA21_XML_DDL_ENDORSEMENTS DROP FOREIGN KEY FK_JPA21_XMLEndorsements
+ALTER TABLE JPA21_XML_DDL_RUNNER_PBS DROP FOREIGN KEY FK_JPA21_XML_Runner_PBS
 DROP INDEX INDEX_JPA21_XML_FORK_STYLE_COLOR ON JPA21_XML_FORK
 DROP TABLE JPA21_XML_FORK
-DROP INDEX XML_FORK_COSTS_INDEX ON JPA21_XML_FORK_COSTS
+DROP INDEX INDEX_JPA21_XML_FORK_COSTS ON JPA21_XML_FORK_COSTS
 DROP TABLE JPA21_XML_FORK_COSTS
 DROP TABLE JPA21_XML_DDL_ORGANIZER
 DROP TABLE JPA21_XML_DDL_ENDORSER
 DROP TABLE JPA21_XML_DDL_RACE
-DROP TABLE JPA21_XML_DLL_RUNNER
+DROP TABLE JPA21_XML_DDL_RUNNER
 DROP TABLE JPA21_XML_DDL_SHOE_TAG
 DROP TABLE JPA21_XML_FORK_USER
 DROP TABLE JPA21_XML_DDL_SHOE
@@ -28,10 +28,10 @@
 DROP TABLE JPA21_XML_FORK_USES
 DROP INDEX JPA21_XML_FORK_USERS_INDEX ON JPA21_XML_FORK_FORK_USERS
 DROP TABLE JPA21_XML_FORK_FORK_USERS
-DROP TABLE DDL_RUNNERS_RACES
+DROP TABLE JPA21_XML_DDL_RUNNERS_RACES
 DROP TABLE JPA21_XML_DDL_RUNNER_ACS
 DROP TABLE JPA21_XML_DDL_ENDORSEMENTS
 DROP TABLE JPA21_XML_DDL_RUNNER_PBS
-DROP INDEX XML_TABLE_GENERATOR_INDEX ON JPA21_XML_PK_SEQ
+DROP INDEX INDEX_JPA21_XML_TABLE_GENERATOR ON JPA21_XML_PK_SEQ
 DELETE FROM JPA21_XML_PK_SEQ WHERE XML_SEQ_NAME = 'XML_UTENSIL_SEQ'
 DELETE FROM SEQUENCE WHERE SEQ_NAME = 'SEQ_GEN'
diff --git a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/advanced-ddl-orm.xml b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/advanced-ddl-orm.xml
index d31de02..fa864e7 100644
--- a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/advanced-ddl-orm.xml
+++ b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/advanced-ddl-orm.xml
@@ -23,16 +23,16 @@
                 <temporal>DATE</temporal>
                 <collection-table  name="JPA22_XML_DDL_RUNNER_ACS">
                     <join-column name="ATHLETE_ID"/>
-                    <foreign-key name="XMLAccomplistments_Foreign_Key" foreign-key-definition="FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
+                    <foreign-key name="FK_JPA22_XMLAccomplishments" foreign-key-definition="FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
                 </collection-table>
             </element-collection>
             <element-collection name="endorsements">
                 <map-key-join-column name="ENDORSER_ID"/>
-                <map-key-foreign-key name="XMLEndorsements_Key_Foreign_Key" foreign-key-definition="FOREIGN KEY (ENDORSER_ID) REFERENCES JPA_XML_DDL_ENDORSER (ID)"/>
+                <map-key-foreign-key name="FK_JPA22_XMLEndorsements_Key" foreign-key-definition="FOREIGN KEY (ENDORSER_ID) REFERENCES JPA22_XML_DDL_ENDORSER (ID)"/>
                 <column name="ENDORSEMENT"/>
                 <collection-table name="JPA22_XML_DDL_ENDORSEMENTS">
                     <join-column name="ATHLETE_ID"/>
-                    <foreign-key name="XMLEndorsements_Foreign_Key" foreign-key-definition="FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
+                    <foreign-key name="FK_JPA22_XMLEndorsements" foreign-key-definition="FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
                 </collection-table>
             </element-collection>
         </attributes>
@@ -43,7 +43,7 @@
             <id name="id">
                 <generated-value strategy="TABLE" generator="XML_UTENSIL_ID_GENERATOR"/>
                 <table-generator name="XML_UTENSIL_ID_GENERATOR" table="JPA22_XML_PK_SEQ" pk-column-name="XML_SEQ_NAME" value-column-name="XML_SEQ_COUNT"  pk-column-value="XML_UTENSIL_SEQ">
-                    <index name="XML_TABLE_GENERATOR_INDEX" column-list="XML_SEQ_COUNT,XML_SEQ_NAME"/>
+                    <index name="INDEX_JPA22_XML_TABLE_GENERATOR" column-list="XML_SEQ_COUNT,XML_SEQ_NAME"/>
                 </table-generator>
             </id>
             <basic name="serialTag">
@@ -53,7 +53,7 @@
     </mapped-superclass>
 
     <entity name="XMLRunner" class="Runner">
-        <table name="JPA22_XML_DLL_RUNNER"/>
+        <table name="JPA22_XML_DDL_RUNNER"/>
         <inheritance strategy="JOINED"/>
         <convert attribute-name="accomplishments.key" converter="org.eclipse.persistence.testing.models.jpa22.advanced.converters.AccomplishmentConverter"/>
         <convert attribute-name="accomplishments" converter="org.eclipse.persistence.testing.models.jpa22.advanced.converters.DateConverter"/>
@@ -66,15 +66,15 @@
                 <convert converter="org.eclipse.persistence.testing.models.jpa22.advanced.converters.GenderConverter"/>
             </basic>
             <one-to-many name="shoes" mapped-by="runner">
-                <map-key-join-column name="TAG_IG"/>
-                <map-key-foreign-key name="XMLRunner_ShoeTag_Foreign_Key" foreign-key-definition="FOREIGN KEY (TAG_ID) REFERENCES JPA22_XML_DDL_SHOE_TAG (ID)"/>
+                <map-key-join-column name="TAG_ID"/>
+                <map-key-foreign-key name="FK_JPA22_XMLRunner_ShoeTag" foreign-key-definition="FOREIGN KEY (TAG_ID) REFERENCES JPA22_XML_DDL_SHOE_TAG (ID)"/>
             </one-to-many>
             <many-to-many name="races">
-                <join-table name="DDL_RUNNERS_RACES">
+                <join-table name="JPA22_XML_DDL_RUNNERS_RACES">
                     <join-column name="RUNNER_ID" referenced-column-name="ID"/>
-                    <foreign-key name="XMLRunners_Races_Foreign_Key" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
+                    <foreign-key name="FK_JPA22_XMLRunners_Races" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
                     <inverse-join-column name="RACE_ID" referenced-column-name="ID"/>
-                    <inverse-foreign-key name="XMLRunners_Races_Inverse_Foreign_Key" foreign-key-definition="FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)"/>
+                    <inverse-foreign-key name="FK_JPA22_XMLRunners_Races_Inverse" foreign-key-definition="FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)"/>
                 </join-table>
             </many-to-many>
             <!-- Currently a convert can not be specified with a column as a -->
@@ -86,7 +86,7 @@
                 <convert converter="org.eclipse.persistence.testing.models.jpa21.advanced.converters.TimeConverter"/>
                 <collection-table name="JPA21_XML_DDL_RUNNER_PBS">
                     <join-column name="RUNNER_ID"/>
-                    <foreign-key name="XML_Runner_PBS_Foreign_Key" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
+                    <foreign-key name="FK_JPA22_XML_Runner_PBS" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)"/>
                 </collection-table>
             </element-collection -->
             <embedded name="info">
@@ -100,7 +100,7 @@
     <entity name="XMLSprinter" class="Sprinter">
         <table name="JPA22_XML_DDL_SPRINTER"/>
         <primary-key-join-column name="SPRINTER_ID" referenced-column-name="ID"/>
-        <primary-key-foreign-key name="XML_Sprinter_Foreign_Key" foreign-key-definition="FOREIGN KEY (SPRINTER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
+        <primary-key-foreign-key name="FK_JPA22_XML_Sprinter" foreign-key-definition="FOREIGN KEY (SPRINTER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
     </entity>
 
     <entity name="XMLShoe" class="Shoe">
@@ -111,7 +111,7 @@
             </id>
             <many-to-one name="runner">
                 <join-column name="RUNNER_ID"/>
-                <foreign-key name="XMLShoes_Runner_Foreign_Key" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
+                <foreign-key name="FK_JPA22_XMLShoes_Runner" foreign-key-definition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)"/>
             </many-to-one>
         </attributes>
     </entity>
@@ -159,7 +159,7 @@
             <basic name="name"/>
             <many-to-one name="race">
                 <join-column name="RACE_ID"/>
-                <foreign-key name="XMLOrganizer_Race_Foreign_Key" foreign-key-definition="FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)"/>
+                <foreign-key name="FK_JPA22_XMLOrganizer_Race" foreign-key-definition="FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)"/>
             </many-to-one>
         </attributes>
     </entity>
@@ -170,7 +170,7 @@
             <index column-list="STYLE, COLOR"/>
         </table>
         <secondary-table name="JPA22_XML_FORK_COSTS">
-            <index name="XML_FORK_COSTS_INDEX" column-list="COST, RENTAL_COST"/>
+            <index name="INDEX_JPA22_XML_FORK_COSTS" column-list="COST, RENTAL_COST"/>
         </secondary-table>
         <attributes>
             <basic name="price">
diff --git a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/advanced-orm.xml b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/advanced-orm.xml
index c63302d..a0c83a1 100644
--- a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/advanced-orm.xml
+++ b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/advanced-orm.xml
@@ -361,7 +361,7 @@
                 </convert>
             </basic>
             <one-to-many name="shoes" mapped-by="runner">
-                <map-key-join-column name="TAG_IG"/>
+                <map-key-join-column name="TAG_ID"/>
             </one-to-many>
             <many-to-many name="races">
                 <join-table name="RUNNERS_RACES">
diff --git a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/jpa22-xml-ddl-model-source-create.jdbc b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/jpa22-xml-ddl-model-source-create.jdbc
index 56423bb..a78ead7 100644
--- a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/jpa22-xml-ddl-model-source-create.jdbc
+++ b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/jpa22-xml-ddl-model-source-create.jdbc
@@ -1,20 +1,20 @@
 CREATE TABLE JPA22_XML_FORK (ID INTEGER NOT NULL, COLOR VARCHAR(255), SERIAL_TAG VARCHAR(255), STYLE VARCHAR(255), PRIMARY KEY (ID))
-CREATE INDEX INDEX_JPA22_XML_FORK_STYLE_COLOR ON JPA22_XML_FORK (STYLE, COLOR)
+CREATE INDEX INDEX_JPA22_XML_FORK_STYLE_COLOR ON JPA22_XML_FORK (STYLE(15), COLOR(15))
 CREATE TABLE JPA22_XML_FORK_COSTS (ID INTEGER NOT NULL, COST DOUBLE, RENTAL_COST DOUBLE, PRIMARY KEY (ID))
-CREATE INDEX XML_FORK_COSTS_INDEX ON JPA22_XML_FORK_COSTS (COST, RENTAL_COST)
+CREATE INDEX INDEX_JPA22_XML_FORK_COSTS ON JPA22_XML_FORK_COSTS (COST, RENTAL_COST)
 CREATE TABLE JPA22_XML_DDL_ORGANIZER (ID INTEGER NOT NULL, NAME VARCHAR(255), RACE_ID INTEGER, DESCRIPTION VARCHAR(255), UNIQUEIDENTIFIER BIGINT, PRIMARY KEY (ID))
 CREATE TABLE JPA22_XML_DDL_ENDORSER (ID INTEGER NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
 CREATE TABLE JPA22_XML_DDL_RACE (ID INTEGER NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
-CREATE TABLE JPA22_XML_DLL_RUNNER (ID INTEGER NOT NULL, DTYPE VARCHAR(31), AGE INTEGER, F_NAME VARCHAR(255), GENDER VARCHAR(255), L_NAME VARCHAR(255), R_HEALTH VARCHAR(255), R_LEVEL VARCHAR(255), R_STATUS VARCHAR(255), PRIMARY KEY (ID))
+CREATE TABLE JPA22_XML_DDL_RUNNER (ID INTEGER NOT NULL, DTYPE VARCHAR(31), AGE INTEGER, F_NAME VARCHAR(255), GENDER VARCHAR(255), L_NAME VARCHAR(255), R_HEALTH VARCHAR(255), R_LEVEL VARCHAR(255), R_STATUS VARCHAR(255), PRIMARY KEY (ID))
 CREATE TABLE JPA22_XML_DDL_SHOE_TAG (ID INTEGER NOT NULL, TAG VARCHAR(255), PRIMARY KEY (ID))
 CREATE TABLE JPA22_XML_FORK_USER (ID INTEGER NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
-CREATE TABLE JPA22_XML_DDL_SHOE (ID INTEGER NOT NULL, BRAND VARCHAR(255), MODEL VARCHAR(255), SIZE INTEGER, RUNNER_ID INTEGER, TAG_IG INTEGER, PRIMARY KEY (ID))
+CREATE TABLE JPA22_XML_DDL_SHOE (ID INTEGER NOT NULL, BRAND VARCHAR(255), MODEL VARCHAR(255), SIZE INTEGER, RUNNER_ID INTEGER, TAG_ID INTEGER, PRIMARY KEY (ID))
 CREATE TABLE JPA22_XML_DDL_SPRINTER (SPRINTER_ID INTEGER NOT NULL, PRIMARY KEY (SPRINTER_ID))
 CREATE TABLE JPA22_XML_FORK_USES (XMLFork_ID INTEGER, DESCRIP VARCHAR(255))
-CREATE INDEX JPA22_XML_FORK_USES_INDEX ON JPA21_XML_FORK_USES (DESCRIP)
+CREATE INDEX JPA22_XML_FORK_USES_INDEX ON JPA22_XML_FORK_USES (DESCRIP)
 CREATE TABLE JPA22_XML_FORK_FORK_USERS (FORK_ID INTEGER NOT NULL, FORK_USER_ID INTEGER NOT NULL, PRIMARY KEY (FORK_ID, FORK_USER_ID))
-CREATE INDEX JPA22_XML_FORK_USERS_INDEX ON JPA21_XML_FORK_FORK_USERS (FORK_USER_ID, FORK_ID)
-CREATE TABLE DDL_RUNNERS_RACES (RACE_ID INTEGER NOT NULL, RUNNER_ID INTEGER NOT NULL, PRIMARY KEY (RACE_ID, RUNNER_ID))
+CREATE INDEX JPA22_XML_FORK_USERS_INDEX ON JPA22_XML_FORK_FORK_USERS (FORK_USER_ID, FORK_ID)
+CREATE TABLE JPA22_XML_DDL_RUNNERS_RACES (RACE_ID INTEGER NOT NULL, RUNNER_ID INTEGER NOT NULL, PRIMARY KEY (RACE_ID, RUNNER_ID))
 CREATE TABLE JPA22_XML_DDL_RUNNER_ACS (ATHLETE_ID INTEGER, THE_DATE BIGINT, ACCOMPLISHMENT VARCHAR(255))
 CREATE TABLE JPA22_XML_DDL_ENDORSEMENTS (ATHLETE_ID INTEGER, ENDORSEMENT INTEGER, ENDORSER_ID INTEGER)
 CREATE TABLE JPA22_XML_DDL_RUNNER_PBS (RUNNER_ID INTEGER, TIME VARCHAR(255), DISTANCE VARCHAR(255))
@@ -22,23 +22,23 @@
 # A comment that should be ignored.
     
 ALTER TABLE JPA22_XML_FORK_COSTS ADD CONSTRAINT FK_JPA22_XML_FORK_COSTS_ID FOREIGN KEY (ID) REFERENCES JPA22_XML_FORK (ID)
-ALTER TABLE JPA22_XML_DDL_ORGANIZER ADD CONSTRAINT XMLOrganizer_Race_Foreign_Key FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)
-ALTER TABLE JPA22_XML_DDL_SHOE ADD CONSTRAINT XMLRunner_ShoeTag_Foreign_Key FOREIGN KEY (TAG_ID) REFERENCES JPA22_XML_DDL_SHOE_TAG (ID)
-ALTER TABLE JPA22_XML_DDL_SHOE ADD CONSTRAINT XMLShoes_Runner_Foreign_Key FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
-ALTER TABLE JPA22_XML_DDL_SPRINTER ADD CONSTRAINT XML_Sprinter_Foreign_Key FOREIGN KEY (SPRINTER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA22_XML_DDL_ORGANIZER ADD CONSTRAINT FK_JPA22_XMLOrganizer_Race FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)
+ALTER TABLE JPA22_XML_DDL_SHOE ADD CONSTRAINT FK_JPA22_XMLRunner_ShoeTag FOREIGN KEY (TAG_ID) REFERENCES JPA22_XML_DDL_SHOE_TAG (ID)
+ALTER TABLE JPA22_XML_DDL_SHOE ADD CONSTRAINT FK_JPA22_XMLShoes_Runner FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA22_XML_DDL_SPRINTER ADD CONSTRAINT FK_JPA22_XML_Sprinter FOREIGN KEY (SPRINTER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
 ALTER TABLE JPA22_XML_FORK_USES ADD CONSTRAINT FK_JPA22_XML_FORK_USES_XMLFork_ID FOREIGN KEY (XMLFork_ID) REFERENCES JPA22_XML_FORK (ID)
 ALTER TABLE JPA22_XML_FORK_FORK_USERS ADD CONSTRAINT FK_JPA22_XML_FORK_FORK_USERS_FORK_ID FOREIGN KEY (FORK_ID) REFERENCES JPA22_XML_FORK (ID)
 ALTER TABLE JPA22_XML_FORK_FORK_USERS ADD CONSTRAINT FK_JPA22_XML_FORK_FORK_USERS_FORK_USER_ID FOREIGN KEY (FORK_USER_ID) REFERENCES JPA22_XML_FORK_USER (ID)
-ALTER TABLE DDL_RUNNERS_RACES ADD CONSTRAINT XMLRunners_Races_Inverse_Foreign_Key FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)
-ALTER TABLE DDL_RUNNERS_RACES ADD CONSTRAINT XMLRunners_Races_Foreign_Key FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
-ALTER TABLE JPA22_XML_DDL_RUNNER_ACS ADD CONSTRAINT XMLAccomplistments_Foreign_Key FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
-ALTER TABLE JPA22_XML_DDL_ENDORSEMENTS ADD CONSTRAINT XMLEndorsements_Key_Foreign_Key FOREIGN KEY (ENDORSER_ID) REFERENCES JPA_XML_DDL_ENDORSER (ID)
-ALTER TABLE JPA22_XML_DDL_ENDORSEMENTS ADD CONSTRAINT XMLEndorsements_Foreign_Key FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
-ALTER TABLE JPA22_XML_DDL_RUNNER_PBS ADD CONSTRAINT XML_Runner_PBS_Foreign_Key FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA22_XML_DDL_RUNNERS_RACES ADD CONSTRAINT FK_JPA22_XMLRunners_Races_Inverse FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)
+ALTER TABLE JPA22_XML_DDL_RUNNERS_RACES ADD CONSTRAINT FK_JPA22_XMLRunners_Races FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA22_XML_DDL_RUNNER_ACS ADD CONSTRAINT FK_JPA22_XMLAccomplishments FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA22_XML_DDL_ENDORSEMENTS ADD CONSTRAINT FK_JPA22_XMLEndorsements_Key FOREIGN KEY (ENDORSER_ID) REFERENCES JPA22_XML_DDL_ENDORSER (ID)
+ALTER TABLE JPA22_XML_DDL_ENDORSEMENTS ADD CONSTRAINT FK_JPA22_XMLEndorsements FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
+ALTER TABLE JPA22_XML_DDL_RUNNER_PBS ADD CONSTRAINT FK_JPA22_XML_Runner_PBS FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)
     
     
 CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38), PRIMARY KEY (SEQ_NAME))
 CREATE TABLE JPA22_XML_PK_SEQ (XML_SEQ_NAME VARCHAR(50) NOT NULL, XML_SEQ_COUNT DECIMAL(38), PRIMARY KEY (XML_SEQ_NAME))
-CREATE INDEX XML_TABLE_GENERATOR_INDEX ON JPA22_XML_PK_SEQ (XML_SEQ_COUNT, XML_SEQ_NAME)
+CREATE INDEX INDEX_JPA22_XML_TABLE_GENERATOR ON JPA22_XML_PK_SEQ (XML_SEQ_COUNT, XML_SEQ_NAME)
 INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)
 INSERT INTO JPA22_XML_PK_SEQ(XML_SEQ_NAME, XML_SEQ_COUNT) values ('XML_UTENSIL_SEQ', 0)
diff --git a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/jpa22-xml-ddl-model-source-drop.jdbc b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/jpa22-xml-ddl-model-source-drop.jdbc
index bbeac67..01a0efc 100644
--- a/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/jpa22-xml-ddl-model-source-drop.jdbc
+++ b/jpa/eclipselink.jpa.test/resource/eclipselink-jpa22-model/jpa22-xml-ddl-model-source-drop.jdbc
@@ -1,25 +1,25 @@
 ALTER TABLE JPA22_XML_FORK_COSTS DROP FOREIGN KEY FK_JPA22_XML_FORK_COSTS_ID
-ALTER TABLE JPA22_XML_DDL_ORGANIZER DROP FOREIGN KEY XMLOrganizer_Race_Foreign_Key
-ALTER TABLE JPA22_XML_DDL_SHOE DROP FOREIGN KEY XMLRunner_ShoeTag_Foreign_Key
-ALTER TABLE JPA22_XML_DDL_SHOE DROP FOREIGN KEY XMLShoes_Runner_Foreign_Key
-ALTER TABLE JPA22_XML_DDL_SPRINTER DROP FOREIGN KEY XML_Sprinter_Foreign_Key
+ALTER TABLE JPA22_XML_DDL_ORGANIZER DROP FOREIGN KEY FK_JPA22_XMLOrganizer_Race
+ALTER TABLE JPA22_XML_DDL_SHOE DROP FOREIGN KEY FK_JPA22_XMLRunner_ShoeTag
+ALTER TABLE JPA22_XML_DDL_SHOE DROP FOREIGN KEY FK_JPA22_XMLShoes_Runner
+ALTER TABLE JPA22_XML_DDL_SPRINTER DROP FOREIGN KEY FK_JPA22_XML_Sprinter
 ALTER TABLE JPA22_XML_FORK_USES DROP FOREIGN KEY FK_JPA22_XML_FORK_USES_XMLFork_ID
 ALTER TABLE JPA22_XML_FORK_FORK_USERS DROP FOREIGN KEY FK_JPA22_XML_FORK_FORK_USERS_FORK_ID
 ALTER TABLE JPA22_XML_FORK_FORK_USERS DROP FOREIGN KEY FK_JPA22_XML_FORK_FORK_USERS_FORK_USER_ID
-ALTER TABLE DDL_RUNNERS_RACES DROP FOREIGN KEY XMLRunners_Races_Inverse_Foreign_Key
-ALTER TABLE DDL_RUNNERS_RACES DROP FOREIGN KEY XMLRunners_Races_Foreign_Key
-ALTER TABLE JPA22_XML_DDL_RUNNER_ACS DROP FOREIGN KEY XMLAccomplistments_Foreign_Key
-ALTER TABLE JPA22_XML_DDL_ENDORSEMENTS DROP FOREIGN KEY XMLEndorsements_Key_Foreign_Key
-ALTER TABLE JPA22_XML_DDL_ENDORSEMENTS DROP FOREIGN KEY XMLEndorsements_Foreign_Key
-ALTER TABLE JPA22_XML_DDL_RUNNER_PBS DROP FOREIGN KEY XML_Runner_PBS_Foreign_Key
+ALTER TABLE JPA22_XML_DDL_RUNNERS_RACES DROP FOREIGN KEY FK_JPA22_XMLRunners_Races_Inverse
+ALTER TABLE JPA22_XML_DDL_RUNNERS_RACES DROP FOREIGN KEY FK_JPA22_XMLRunners_Races
+ALTER TABLE JPA22_XML_DDL_RUNNER_ACS DROP FOREIGN KEY FK_JPA22_XMLAccomplishments
+ALTER TABLE JPA22_XML_DDL_ENDORSEMENTS DROP FOREIGN KEY FK_JPA22_XMLEndorsements_Key
+ALTER TABLE JPA22_XML_DDL_ENDORSEMENTS DROP FOREIGN KEY FK_JPA22_XMLEndorsements
+ALTER TABLE JPA22_XML_DDL_RUNNER_PBS DROP FOREIGN KEY FK_JPA22_XML_Runner_PBS
 DROP INDEX INDEX_JPA22_XML_FORK_STYLE_COLOR ON JPA22_XML_FORK
 DROP TABLE JPA22_XML_FORK
-DROP INDEX XML_FORK_COSTS_INDEX ON JPA22_XML_FORK_COSTS
+DROP INDEX INDEX_JPA22_XML_FORK_COSTS ON JPA22_XML_FORK_COSTS
 DROP TABLE JPA22_XML_FORK_COSTS
 DROP TABLE JPA22_XML_DDL_ORGANIZER
 DROP TABLE JPA22_XML_DDL_ENDORSER
 DROP TABLE JPA22_XML_DDL_RACE
-DROP TABLE JPA22_XML_DLL_RUNNER
+DROP TABLE JPA22_XML_DDL_RUNNER
 DROP TABLE JPA22_XML_DDL_SHOE_TAG
 DROP TABLE JPA22_XML_FORK_USER
 DROP TABLE JPA22_XML_DDL_SHOE
@@ -28,10 +28,10 @@
 DROP TABLE JPA22_XML_FORK_USES
 DROP INDEX JPA22_XML_FORK_USERS_INDEX ON JPA22_XML_FORK_FORK_USERS
 DROP TABLE JPA22_XML_FORK_FORK_USERS
-DROP TABLE DDL_RUNNERS_RACES
+DROP TABLE JPA22_XML_DDL_RUNNERS_RACES
 DROP TABLE JPA22_XML_DDL_RUNNER_ACS
 DROP TABLE JPA22_XML_DDL_ENDORSEMENTS
 DROP TABLE JPA22_XML_DDL_RUNNER_PBS
-DROP INDEX XML_TABLE_GENERATOR_INDEX ON JPA22_XML_PK_SEQ
+DROP INDEX INDEX_JPA22_XML_TABLE_GENERATOR ON JPA22_XML_PK_SEQ
 DELETE FROM JPA22_XML_PK_SEQ WHERE XML_SEQ_NAME = 'XML_UTENSIL_SEQ'
 DELETE FROM SEQUENCE WHERE SEQ_NAME = 'SEQ_GEN'
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/compositepk/CompositePKTableCreator.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/compositepk/CompositePKTableCreator.java
index 7b3bbef..437f181 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/compositepk/CompositePKTableCreator.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/compositepk/CompositePKTableCreator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 1998, 2015 Oracle and/or its affiliates, IBM Corporation. All rights reserved.
+ * Copyright (c) 1998, 2017 Oracle and/or its affiliates, IBM Corporation. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -1148,10 +1148,7 @@
         try {
             if (session.getPlatform().supportsUniqueKeyConstraints()
                     && !session.getPlatform().requiresUniqueConstraintCreationOnTableCreate()) {
-                if (session.getPlatform().isMySQL()) {
-                    session.executeNonSelectingSQL("Alter table CMP3_SCIENTIST drop foreign key CMP3_SCIENTIST_CUBICLE");
-                    session.executeNonSelectingSQL("Alter table CMP3_SCIENTIST drop foreign key CMP3_SCIENTIST_DEPT");
-                } else {
+                if (!session.getPlatform().isMySQL()) {
                     session.executeNonSelectingSQL("Alter table CMP3_SCIENTIST drop constraint CMP3_SCIENTIST_CUBICLE");
                     session.executeNonSelectingSQL("Alter table CMP3_SCIENTIST drop constraint CMP3_SCIENTIST_DEPT");
                 }
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceTableCreator.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceTableCreator.java
index 5148e01..ce2f2e3 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceTableCreator.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceTableCreator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 1998, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017 Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -2459,9 +2459,7 @@
         try {
             if (session.getPlatform().supportsUniqueKeyConstraints()
                     && !session.getPlatform().requiresUniqueConstraintCreationOnTableCreate()) {
-                if (session.getPlatform().isMySQL()) {
-                    session.executeNonSelectingSQL("Alter table CMP3_ENGINEER_LAPTOP drop foreign key CMP3_ENGINEER_LAPTOP_FK1");
-                } else {
+                if (!session.getPlatform().isMySQL()) {
                     session.executeNonSelectingSQL("Alter table CMP3_ENGINEER_LAPTOP drop constraint CMP3_ENGINEER_LAPTOP_FK1");
                 }
             }
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/orphanremoval/OrphanRemovalModelTableCreator.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/orphanremoval/OrphanRemovalModelTableCreator.java
index 2182979..89a4024 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/orphanremoval/OrphanRemovalModelTableCreator.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/orphanremoval/OrphanRemovalModelTableCreator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 1998, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017 Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -395,14 +395,7 @@
         if (session.getPlatform().supportsUniqueKeyConstraints()
                 && !session.getPlatform().requiresUniqueConstraintCreationOnTableCreate()) {
             try {
-                if (session.getPlatform().isMySQL()) {
-                    session.executeNonSelectingSQL("Alter table JPA_OR_SPARK_PLUG drop foreign key JPA_OR_SPARK_PLUG_ENGINE_ID");
-                    session.executeNonSelectingSQL("Alter table JPA_OR_VEHICLE drop foreign key FK_JPA_OR_VEHICLE_ENGINE_ID");
-                    session.executeNonSelectingSQL("Alter table JPA_OR_VEHICLE drop foreign key FK_JPA_OR_VEHICLE_CHASSIS_ID");
-                    session.executeNonSelectingSQL("Alter table JPA_OR_WHEEL drop foreign key FK_JPA_OR_WHEEL_WHEELRIM_ID");
-                    session.executeNonSelectingSQL("Alter table JPA_OR_WHEEL drop foreign key FK_JPA_OR_WHEEL_CHASSIS_ID");
-                    session.executeNonSelectingSQL("Alter table JPA_OR_WHEEL_NUT drop foreign key FK_JPA_OR_WHEEL_NUT_WHEEL_ID");
-                } else {
+                if (!session.getPlatform().isMySQL()) {
                     session.executeNonSelectingSQL("Alter table JPA_OR_SPARK_PLUG drop constraint JPA_OR_SPARK_PLUG_ENGINE_ID");
                     session.executeNonSelectingSQL("Alter table JPA_OR_VEHICLE drop constraint FK_JPA_OR_VEHICLE_ENGINE_ID");
                     session.executeNonSelectingSQL("Alter table JPA_OR_VEHICLE drop constraint FK_JPA_OR_VEHICLE_CHASSIS_ID");
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/privateowned/PrivateOwnedModelTableCreator.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/privateowned/PrivateOwnedModelTableCreator.java
index caab4d4..826be22 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/privateowned/PrivateOwnedModelTableCreator.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/privateowned/PrivateOwnedModelTableCreator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 1998, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017 Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -448,14 +448,7 @@
         if (session.getPlatform().supportsUniqueKeyConstraints()
                 && !session.getPlatform().requiresUniqueConstraintCreationOnTableCreate()) {
             try {
-                if (session.getPlatform().isMySQL()) {
-                    session.executeNonSelectingSQL("Alter table CMP3_PO_SPARK_PLUG drop foreign key CMP3_PO_SPARK_PLUG_ENGINE_ID");
-                    session.executeNonSelectingSQL("Alter table CMP3_PO_VEHICLE drop foreign key FK_CMP3_PO_VEHICLE_ENGINE_ID");
-                    session.executeNonSelectingSQL("Alter table CMP3_PO_VEHICLE drop foreign key FK_CMP3_PO_VEHICLE_CHASSIS_ID");
-                    session.executeNonSelectingSQL("Alter table CMP3_PO_WHEEL drop foreign key FK_CMP3_PO_WHEEL_WHEELRIM_ID");
-                    session.executeNonSelectingSQL("Alter table CMP3_PO_WHEEL drop foreign key FK_CMP3_PO_WHEEL_CHASSIS_ID");
-                    session.executeNonSelectingSQL("Alter table CMP3_PO_WHEEL_NUT drop foreign key FK_CMP3_PO_WHEEL_NUT_WHEEL_ID");
-                } else {
+                if (!session.getPlatform().isMySQL()) {
                     session.executeNonSelectingSQL("Alter table CMP3_PO_SPARK_PLUG drop constraint CMP3_PO_SPARK_PLUG_ENGINE_ID");
                     session.executeNonSelectingSQL("Alter table CMP3_PO_VEHICLE drop constraint FK_CMP3_PO_VEHICLE_ENGINE_ID");
                     session.executeNonSelectingSQL("Alter table CMP3_PO_VEHICLE drop constraint FK_CMP3_PO_VEHICLE_CHASSIS_ID");
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/xml/ddl/Runner.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/xml/ddl/Runner.java
index f3fe27f..67ca9d6 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/xml/ddl/Runner.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/xml/ddl/Runner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -47,7 +47,7 @@
         name="JPA21_XML_DDL_RUNNER_PBS",
         joinColumns=@JoinColumn(name="RUNNER_ID"),
         foreignKey=@ForeignKey(
-                name="XML_Runner_PBS_Foreign_Key",
+                name="FK_JPA21_XML_Runner_PBS",
                 foreignKeyDefinition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)")
     )
     @Converts({
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/ddl/schema/Runner.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/ddl/schema/Runner.java
index 45c3a52..3e1c138 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/ddl/schema/Runner.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/ddl/schema/Runner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013, 2015  Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017  Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -52,7 +52,7 @@
 
 @Entity
 @Inheritance(strategy=JOINED)
-@Table(name="JPA21_DDL_RUNNER", schema="RUNNER")
+@Table(name="JPA22_DDL_RUNNER", schema="RUNNER")
 @Convert(attributeName = "accomplishments.key", converter = AccomplishmentConverter.class)
 @Convert(attributeName = "accomplishments", converter = DateConverter.class)
 @Convert(attributeName = "age", converter = AgeConverter.class)
@@ -75,7 +75,7 @@
         name="TAG_ID",
         foreignKey=@ForeignKey(
             name="Runner_ShoeTag_Foreign_Key",
-            foreignKeyDefinition="FOREIGN KEY (TAG_ID) REFERENCES JPA21_DDL_SHOE_TAG (ID)"
+            foreignKeyDefinition="FOREIGN KEY (TAG_ID) REFERENCES JPA22_DDL_SHOE_TAG (ID)"
         )
     )
     protected Map<ShoeTag, Shoe> shoes;
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/xml/ddl/Runner.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/xml/ddl/Runner.java
index 7de12c0..0b80230 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/xml/ddl/Runner.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/xml/ddl/Runner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -46,7 +46,7 @@
         name="JPA22_XML_DDL_RUNNER_PBS",
         joinColumns=@JoinColumn(name="RUNNER_ID"),
         foreignKey=@ForeignKey(
-                name="XML_Runner_PBS_Foreign_Key",
+                name="FK_JPA22_XML_Runner_PBS",
                 foreignKeyDefinition="FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)")
     )
     @Convert(attributeName="key", converter = DistanceConverter.class)
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java
index dfe10af..94054d8 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017 Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -102,7 +102,7 @@
         ClassDescriptor sprinterDescriptor = getPersistenceUnitServerSession().getDescriptor(Sprinter.class);
         DatabaseTable table = sprinterDescriptor.getTable("JPA21_XML_DDL_SPRINTER");
 
-        assertForeignKeyConstraint("XML_Sprinter_Foreign_Key", "FOREIGN KEY (SPRINTER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XML_Sprinter", "FOREIGN KEY (SPRINTER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
     }
 
     /**
@@ -113,7 +113,7 @@
         DirectCollectionMapping mapping = (DirectCollectionMapping) runnerDescriptor.getMappingForAttributeName("personalBests");
         DatabaseTable table = mapping.getReferenceTable();
 
-        assertForeignKeyConstraint("XML_Runner_PBS_Foreign_Key", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XML_Runner_PBS", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
     }
 
     /**
@@ -124,8 +124,8 @@
         ManyToManyMapping mapping = (ManyToManyMapping) runnerDescriptor.getMappingForAttributeName("races");
         DatabaseTable table = mapping.getRelationTable();
 
-        assertForeignKeyConstraint("XMLRunners_Races_Foreign_Key", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
-        assertForeignKeyConstraint("XMLRunners_Races_Inverse_Foreign_Key", "FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XMLRunners_Races", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XMLRunners_Races_Inverse", "FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)", table);
     }
 
     /**
@@ -137,7 +137,7 @@
         OneToOneMapping keyMapping = (OneToOneMapping) ((MappedKeyMapContainerPolicy) mapping.getContainerPolicy()).getKeyMapping();
         DatabaseTable table = keyMapping.getForeignKeyFields().get(0).getTable();
 
-        assertForeignKeyConstraint("XMLRunner_ShoeTag_Foreign_Key", "FOREIGN KEY (TAG_ID) REFERENCES JPA21_XML_DDL_SHOE_TAG (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XMLRunner_ShoeTag", "FOREIGN KEY (TAG_ID) REFERENCES JPA21_XML_DDL_SHOE_TAG (ID)", table);
     }
 
     /**
@@ -148,13 +148,13 @@
         OneToOneMapping mapping = (OneToOneMapping) shoeDescriptor.getMappingForAttributeName("runner");
         DatabaseTable table = mapping.getForeignKeyFields().get(0).getTable();
 
-        assertForeignKeyConstraint("XMLShoes_Runner_Foreign_Key", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XMLShoes_Runner", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
 
         ClassDescriptor organizerDescriptor = getPersistenceUnitServerSession().getDescriptor(Organizer.class);
         mapping = (OneToOneMapping) organizerDescriptor.getMappingForAttributeName("race");
         table = mapping.getForeignKeyFields().get(0).getTable();
 
-        assertForeignKeyConstraint("XMLOrganizer_Race_Foreign_Key", "FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XMLOrganizer_Race", "FOREIGN KEY (RACE_ID) REFERENCES JPA21_XML_DDL_RACE (ID)", table);
     }
 
     /**
@@ -166,16 +166,16 @@
         OneToOneMapping keyMapping = (OneToOneMapping) ((MappedKeyMapContainerPolicy) mapping.getContainerPolicy()).getKeyMapping();
         DatabaseTable table = mapping.getReferenceTable();
 
-        assertForeignKeyConstraint("XMLEndorsements_Foreign_Key", "FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XMLEndorsements", "FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
 
         table = keyMapping.getForeignKeyFields().get(0).getTable();
 
-        assertForeignKeyConstraint("XMLEndorsements_Key_Foreign_Key", "FOREIGN KEY (ENDORSER_ID) REFERENCES JPA_XML_DDL_ENDORSER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XMLEndorsements_Key", "FOREIGN KEY (ENDORSER_ID) REFERENCES JPA21_XML_DDL_ENDORSER (ID)", table);
 
         mapping = (DirectMapMapping) runnerDescriptor.getMappingForAttributeName("accomplishments");
         table = mapping.getReferenceTable();
 
-        assertForeignKeyConstraint("XMLAccomplistments_Foreign_Key", "FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA21_XMLAccomplishments", "FOREIGN KEY (ATHLETE_ID) REFERENCES JPA21_XML_DDL_RUNNER (ID)", table);
     }
 
     /**
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java
index 949a282..b975390 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2015 Oracle and/or its affiliates, IBM Corporation. All rights reserved.
+ * Copyright (c) 2012, 2017 Oracle and/or its affiliates, IBM Corporation. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
  * which accompanies this distribution.
@@ -215,9 +215,9 @@
      * Test the generate schema feature from the Persistence API.
      */
     public void testPersistenceGenerateSchemaUseConnection() {
-        String GENERATE_SCHEMA_NO_CONNECTION_DROP_TARGET = "jpa21-generate-schema-use-connection-drop.jdbc";
-        String GENERATE_SCHEMA_NO_CONNECTION_CREATE_TARGET = "jpa21-generate-schema-use-connection-create.jdbc";
-        String GENERATE_SCHEMA_NO_CONNECTION_SESSION_NAME = "generate-schema-use-conn-session";
+        String GENERATE_SCHEMA_NO_CONNECTION_DROP_TARGET = "jpa22-generate-schema-use-connection-drop.jdbc";
+        String GENERATE_SCHEMA_NO_CONNECTION_CREATE_TARGET = "jpa22-generate-schema-use-connection-create.jdbc";
+        String GENERATE_SCHEMA_NO_CONNECTION_SESSION_NAME = "jpa22-generate-schema-use-conn-session";
 
         Map properties = new HashMap();
         // Get database properties will pick up test.properties database connection details.
@@ -249,9 +249,9 @@
         // testing framework. Need to clear it for this test.
         closeEntityManagerFactory();
 
-        String GENERATE_SCHEMA_NO_CONNECTION_DROP_TARGET = "jpa21-generate-schema-no-connection-drop-"+platform+".jdbc";
-        String GENERATE_SCHEMA_NO_CONNECTION_CREATE_TARGET = "jpa21-generate-schema-no-connection-create-"+platform+".jdbc";
-        String GENERATE_SCHEMA_NO_CONNECTION_SESSION_NAME = "generate-schema-no-conn-session-" + platform;
+        String GENERATE_SCHEMA_NO_CONNECTION_DROP_TARGET = "jpa22-generate-schema-no-connection-drop-"+platform+".jdbc";
+        String GENERATE_SCHEMA_NO_CONNECTION_CREATE_TARGET = "jpa22-generate-schema-no-connection-create-"+platform+".jdbc";
+        String GENERATE_SCHEMA_NO_CONNECTION_SESSION_NAME = "jpa22-generate-schema-no-conn-session-" + platform;
 
         Map properties = new HashMap();
         properties.put(PersistenceUnitProperties.SESSION_NAME, GENERATE_SCHEMA_NO_CONNECTION_SESSION_NAME);
@@ -316,7 +316,7 @@
         properties.put(PersistenceUnitProperties.SCHEMA_DATABASE_MAJOR_VERSION, "5");
         properties.put(PersistenceUnitProperties.SCHEMA_DATABASE_MINOR_VERSION, "5");
         properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_ACTION, PersistenceUnitProperties.SCHEMA_GENERATION_DROP_ACTION);
-        properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "jpa21-generate-schema-no-connection-drop-only.jdbc");
+        properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "jpa22-generate-schema-no-connection-drop-only.jdbc");
 
         Persistence.generateSchema(getPersistenceUnitName(), properties);
     }
@@ -328,13 +328,13 @@
         Map properties = new HashMap();
         // Get database properties will pick up test.properties database connection details.
         properties.putAll(JUnitTestCaseHelper.getDatabaseProperties(getPersistenceUnitName()));
-        properties.put(PersistenceUnitProperties.SESSION_NAME, "generate-schema-using-provided-writers");
+        properties.put(PersistenceUnitProperties.SESSION_NAME, "jpa22-generate-schema-using-provided-writers");
         properties.put(PersistenceUnitProperties.ORM_SCHEMA_VALIDATION, "true");
         properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_ACTION, PersistenceUnitProperties.SCHEMA_GENERATION_DROP_AND_CREATE_ACTION);
 
         try {
-            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, new FileWriter(new File("jpa21-generate-schema-using-drop-writer.jdbc")));
-            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET, new FileWriter(new File("jpa21-generate-schema-using-create-writer.jdbc")));
+            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, new FileWriter(new File("jpa22-generate-schema-using-drop-writer.jdbc")));
+            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET, new FileWriter(new File("jpa22-generate-schema-using-create-writer.jdbc")));
 
             Persistence.generateSchema(getPersistenceUnitName(), properties);
         } catch (IOException e) {
@@ -348,7 +348,7 @@
         Map properties = new HashMap();
         // Get database properties will pick up test.properties database connection details.
         properties.putAll(JUnitTestCaseHelper.getDatabaseProperties(getPersistenceUnitName()));
-        properties.put(PersistenceUnitProperties.SESSION_NAME, "testRootTargetScriptFileName");
+        properties.put(PersistenceUnitProperties.SESSION_NAME, "jpa22-testRootTargetScriptFileName");
         properties.put(PersistenceUnitProperties.ORM_SCHEMA_VALIDATION, "true");
         properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_ACTION, PersistenceUnitProperties.SCHEMA_GENERATION_DROP_AND_CREATE_ACTION);
         properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "/temp-generate-schema-drop.jdbc");
@@ -361,7 +361,7 @@
         Map properties = new HashMap();
         // Get database properties will pick up test.properties database connection details.
         properties.putAll(JUnitTestCaseHelper.getDatabaseProperties(getPersistenceUnitName()));
-        properties.put(PersistenceUnitProperties.SESSION_NAME, "testIllegalArgumentExceptionWithNoScriptTargetsProvided");
+        properties.put(PersistenceUnitProperties.SESSION_NAME, "jpa22-testIllegalArgumentExceptionWithNoScriptTargetsProvided");
         properties.put(PersistenceUnitProperties.ORM_SCHEMA_VALIDATION, "true");
         properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_ACTION, PersistenceUnitProperties.SCHEMA_GENERATION_CREATE_ACTION);
 
@@ -381,10 +381,10 @@
             Map properties = new HashMap();
             // Get database properties will pick up test.properties database connection details.
             properties.putAll(JUnitTestCaseHelper.getDatabaseProperties("ddl-schema-template"));
-            properties.put(PersistenceUnitProperties.SESSION_NAME, "ddl-schema-create-only-session");
+            properties.put(PersistenceUnitProperties.SESSION_NAME, "jpa22-ddl-schema-create-only-session");
             properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_ACTION, PersistenceUnitProperties.SCHEMA_GENERATION_CREATE_ACTION);
             properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_CREATE_DATABASE_SCHEMAS, "true");
-            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET, "jpa21-ddl-schema-create-only-create.jdbc");
+            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET, "jpa22-ddl-schema-create-only-create.jdbc");
 
             try {
                 Persistence.generateSchema("ddl-schema-template", properties);
@@ -400,10 +400,10 @@
             Map properties = new HashMap();
             // Get database properties will pick up test.properties database connection details.
             properties.putAll(JUnitTestCaseHelper.getDatabaseProperties("ddl-schema-template"));
-            properties.put(PersistenceUnitProperties.SESSION_NAME, "ddl-schema-drop-only-session");
+            properties.put(PersistenceUnitProperties.SESSION_NAME, "jpa22-ddl-schema-drop-only-session");
             properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_ACTION, PersistenceUnitProperties.SCHEMA_GENERATION_DROP_ACTION);
             properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_CREATE_DATABASE_SCHEMAS, "true");
-            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "jpa21-ddl-schema-drop-only-drop.jdbc");
+            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "jpa22-ddl-schema-drop-only-drop.jdbc");
 
             try {
                 Persistence.generateSchema("ddl-schema-template", properties);
@@ -420,11 +420,11 @@
             Map properties = new HashMap();
             // Get database properties will pick up test.properties database connection details.
             properties.putAll(JUnitTestCaseHelper.getDatabaseProperties("ddl-schema-template"));
-            properties.put(PersistenceUnitProperties.SESSION_NAME, "ddl-schema-drop-and-create-session");
+            properties.put(PersistenceUnitProperties.SESSION_NAME, "jpa22-ddl-schema-drop-and-create-session");
             properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_ACTION, PersistenceUnitProperties.SCHEMA_GENERATION_DROP_AND_CREATE_ACTION);
             properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_CREATE_DATABASE_SCHEMAS, "true");
-            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "jpa21-ddl-schema-drop-and-create-drop.jdbc");
-            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET, "jpa21-ddl-schema-drop-and-create-create.jdbc");
+            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "jpa22-ddl-schema-drop-and-create-drop.jdbc");
+            properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET, "jpa22-ddl-schema-drop-and-create-create.jdbc");
 
             try {
                 Persistence.generateSchema("ddl-schema-template", properties);
@@ -440,10 +440,10 @@
         Map properties = new HashMap();
         // Get database properties will pick up test.properties database connection details.
         properties.putAll(JUnitTestCaseHelper.getDatabaseProperties("ddl-schema-template"));
-        properties.put(PersistenceUnitProperties.SESSION_NAME, "ddl-schema-url-target-session");
+        properties.put(PersistenceUnitProperties.SESSION_NAME, "jpa22-ddl-schema-url-target-session");
         properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_ACTION, PersistenceUnitProperties.SCHEMA_GENERATION_DROP_AND_CREATE_ACTION);
-        properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET, "file:///jpa21-ddl-schema-url-target-create.jdbc");
-        properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "file:///jpa21-ddl-schema-url-target-drop.jdbc");
+        properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET, "file:///jpa22-ddl-schema-url-target-create.jdbc");
+        properties.put(PersistenceUnitProperties.SCHEMA_GENERATION_SCRIPTS_DROP_TARGET, "file:///jpa22-ddl-schema-url-target-drop.jdbc");
 
         try {
             Persistence.generateSchema("ddl-schema-template", properties);
@@ -457,9 +457,9 @@
      * info, Map map) method from the Persistence API.
      */
     public void testContainerGenerateSchema() {
-        String CONTAINER_GENERATE_SCHEMA_DROP_TARGET = "jpa21-container-generate-schema-drop.jdbc";
-        String CONTAINER_GENERATE_SCHEMA_CREATE_TARGET = "jpa21-container-generate-schema-create.jdbc";
-        String CONTAINER_GENERATE_SCHEMA_SESSION_NAME = "container-generate-schema-session";
+        String CONTAINER_GENERATE_SCHEMA_DROP_TARGET = "jpa22-container-generate-schema-drop.jdbc";
+        String CONTAINER_GENERATE_SCHEMA_CREATE_TARGET = "jpa22-container-generate-schema-create.jdbc";
+        String CONTAINER_GENERATE_SCHEMA_SESSION_NAME = "jpa22-container-generate-schema-session";
 
         Map properties = new HashMap();
         // Get database properties will pick up test.properties database connection details.
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java
index a9dd7bd..b2687cb 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java
@@ -99,7 +99,7 @@
         ClassDescriptor sprinterDescriptor = getPersistenceUnitServerSession().getDescriptor(Sprinter.class);
         DatabaseTable table = sprinterDescriptor.getTable("JPA22_XML_DDL_SPRINTER");
 
-        assertForeignKeyConstraint("XML_Sprinter_Foreign_Key", "FOREIGN KEY (SPRINTER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XML_Sprinter", "FOREIGN KEY (SPRINTER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
     }
 
     /**
@@ -110,7 +110,7 @@
         DirectCollectionMapping mapping = (DirectCollectionMapping) runnerDescriptor.getMappingForAttributeName("personalBests");
         DatabaseTable table = mapping.getReferenceTable();
 
-        assertForeignKeyConstraint("XML_Runner_PBS_Foreign_Key", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XML_Runner_PBS", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
     }
 
     /**
@@ -121,8 +121,8 @@
         ManyToManyMapping mapping = (ManyToManyMapping) runnerDescriptor.getMappingForAttributeName("races");
         DatabaseTable table = mapping.getRelationTable();
 
-        assertForeignKeyConstraint("XMLRunners_Races_Foreign_Key", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
-        assertForeignKeyConstraint("XMLRunners_Races_Inverse_Foreign_Key", "FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XMLRunners_Races", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XMLRunners_Races_Inverse", "FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)", table);
     }
 
     /**
@@ -134,7 +134,7 @@
         OneToOneMapping keyMapping = (OneToOneMapping) ((MappedKeyMapContainerPolicy) mapping.getContainerPolicy()).getKeyMapping();
         DatabaseTable table = keyMapping.getForeignKeyFields().get(0).getTable();
 
-        assertForeignKeyConstraint("XMLRunner_ShoeTag_Foreign_Key", "FOREIGN KEY (TAG_ID) REFERENCES JPA22_XML_DDL_SHOE_TAG (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XMLRunner_ShoeTag", "FOREIGN KEY (TAG_ID) REFERENCES JPA22_XML_DDL_SHOE_TAG (ID)", table);
     }
 
     /**
@@ -145,13 +145,13 @@
         OneToOneMapping mapping = (OneToOneMapping) shoeDescriptor.getMappingForAttributeName("runner");
         DatabaseTable table = mapping.getForeignKeyFields().get(0).getTable();
 
-        assertForeignKeyConstraint("XMLShoes_Runner_Foreign_Key", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XMLShoes_Runner", "FOREIGN KEY (RUNNER_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
 
         ClassDescriptor organizerDescriptor = getPersistenceUnitServerSession().getDescriptor(Organizer.class);
         mapping = (OneToOneMapping) organizerDescriptor.getMappingForAttributeName("race");
         table = mapping.getForeignKeyFields().get(0).getTable();
 
-        assertForeignKeyConstraint("XMLOrganizer_Race_Foreign_Key", "FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XMLOrganizer_Race", "FOREIGN KEY (RACE_ID) REFERENCES JPA22_XML_DDL_RACE (ID)", table);
     }
 
     /**
@@ -163,16 +163,16 @@
         OneToOneMapping keyMapping = (OneToOneMapping) ((MappedKeyMapContainerPolicy) mapping.getContainerPolicy()).getKeyMapping();
         DatabaseTable table = mapping.getReferenceTable();
 
-        assertForeignKeyConstraint("XMLEndorsements_Foreign_Key", "FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XMLEndorsements", "FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
 
         table = keyMapping.getForeignKeyFields().get(0).getTable();
 
-        assertForeignKeyConstraint("XMLEndorsements_Key_Foreign_Key", "FOREIGN KEY (ENDORSER_ID) REFERENCES JPA_XML_DDL_ENDORSER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XMLEndorsements_Key", "FOREIGN KEY (ENDORSER_ID) REFERENCES JPA22_XML_DDL_ENDORSER (ID)", table);
 
         mapping = (DirectMapMapping) runnerDescriptor.getMappingForAttributeName("accomplishments");
         table = mapping.getReferenceTable();
 
-        assertForeignKeyConstraint("XMLAccomplistments_Foreign_Key", "FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
+        assertForeignKeyConstraint("FK_JPA22_XMLAccomplishments", "FOREIGN KEY (ATHLETE_ID) REFERENCES JPA22_XML_DDL_RUNNER (ID)", table);
     }
 
     /**