================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/compositepk/JuniorScientist.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.0
Report generated at Thu May  4 15:43:41 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/compositepk/JuniorScientist.java	Thu May  4 15:43:15 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.0	Thu May  4 16:36:43 2006
***************
*** 1,29 ****
- /*
-  * The contents of this file are subject to the terms 
-  * of the Common Development and Distribution License 
-  * (the "License").  You may not use this file except 
-  * in compliance with the License.
-  * 
-  * You can obtain a copy of the license at 
-  * glassfish/bootstrap/legal/CDDLv1.0.txt or 
-  * https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-  * See the License for the specific language governing 
-  * permissions and limitations under the License.
-  * 
-  * When distributing Covered Code, include this CDDL 
-  * HEADER in each file and include the License file at 
-  * glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable, 
-  * add the following below this CDDL HEADER, with the 
-  * fields enclosed by brackets "[]" replaced with your 
-  * own identifying information: Portions Copyright [yyyy] 
-  * [name of copyright owner]
-  */
- // Copyright (c) 1998, 2006, Oracle. All rights reserved.  
- 
- package oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk;
- 
- import javax.persistence.Entity;
- 
- @Entity
- public class JuniorScientist extends Scientist  {
- }
\ No newline at end of file
--- 0 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/compositepk/AdvancedCompositePKJunitTest.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.4
Report generated at Thu May  4 15:43:41 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/compositepk/AdvancedCompositePKJunitTest.java	Thu May  4 15:43:41 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.4	Thu May  4 14:16:42 2006
***************
*** 28,34 ****
  import oracle.toplink.essentials.sessions.DatabaseSession;
  import oracle.toplink.essentials.testing.framework.junit.JUnitTestCase;
  import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.Cubicle;
- import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.JuniorScientist;
  import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.Scientist;
  import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.ScientistPK;
  import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.Department;
--- 28,33 ----
***************
*** 37,43 ****
   
  public class AdvancedCompositePKJunitTest extends JUnitTestCase {
      private static DepartmentPK m_departmentPK;
!     private static ScientistPK m_scientist1PK, m_scientist2PK, m_scientist3PK, m_jScientistPK; 
      
      public AdvancedCompositePKJunitTest() {
          super();
--- 36,42 ----
   
  public class AdvancedCompositePKJunitTest extends JUnitTestCase {
      private static DepartmentPK m_departmentPK;
!     private static ScientistPK m_scientist1PK, m_scientist2PK, m_scientist3PK; 
      
      public AdvancedCompositePKJunitTest() {
          super();
***************
*** 47,56 ****
          super(name);
      }
      
-     public static void main(String[] args) {
-         junit.swingui.TestRunner.main(args);
-     }
-     
      public void setUp() {
          clearCache();
          super.setUp();
--- 46,51 ----
***************
*** 62,68 ****
          suite.addTest(new AdvancedCompositePKJunitTest("testCreateDepartment"));
          suite.addTest(new AdvancedCompositePKJunitTest("testCreateScientists"));
          suite.addTest(new AdvancedCompositePKJunitTest("testReadDepartment"));
-         suite.addTest(new AdvancedCompositePKJunitTest("testReadJuniorScientist"));
  
          return new TestSetup(suite) {
              protected void setUp() {               
--- 57,62 ----
***************
*** 114,169 ****
      }
      
      public void testCreateScientists() {
          EntityManager em = createEntityManager();
          em.getTransaction().begin();
!         
!         try {    
              Department department = (Department) em.merge(em.find(Department.class, m_departmentPK));
              
              Cubicle cubicle1 = new Cubicle("G");
              em.persist(cubicle1);
              
!             Scientist scientist1 = new Scientist();
              scientist1.setFirstName("Guy");
              scientist1.setLastName("Pelletier");
              scientist1.setCubicle(cubicle1);
              department.addScientist(scientist1);
              em.persist(scientist1);
-             m_scientist1PK = scientist1.getPK();
          
              Cubicle cubicle2 = new Cubicle("T");
              em.persist(cubicle2);
              
!             Scientist scientist2 = new Scientist();
              scientist2.setFirstName("Tom");
              scientist2.setLastName("Ware");
              scientist2.setCubicle(cubicle2);
              department.addScientist(scientist2);
              em.persist(scientist2);
-             m_scientist2PK = scientist2.getPK();
              
              Cubicle cubicle3 = new Cubicle("G");
              em.persist(cubicle3);
              
!             Scientist scientist3 = new Scientist();
              scientist3.setFirstName("Gordon");
              scientist3.setLastName("Yorke");
              scientist3.setCubicle(cubicle3);
              department.addScientist(scientist3);
              em.persist(scientist3);
-             m_scientist3PK = scientist3.getPK();
-             
-             Cubicle cubicle4 = new Cubicle("J");
-             em.persist(cubicle4);
-             
-             JuniorScientist jScientist = new JuniorScientist();
-             jScientist.setFirstName("Junior");
-             jScientist.setLastName("Sao");
-             jScientist.setCubicle(cubicle4);
-             department.addScientist(jScientist);
-             em.persist(jScientist);
-             m_jScientistPK = jScientist.getPK();
-             
              em.getTransaction().commit();
          } catch (RuntimeException e) {
              if (em.getTransaction().isActive()){
--- 108,149 ----
      }
      
      public void testCreateScientists() {
+         Scientist scientist1 = null, scientist2 = null, scientist3 = null;
          EntityManager em = createEntityManager();
          em.getTransaction().begin();
!         try {
!             
              Department department = (Department) em.merge(em.find(Department.class, m_departmentPK));
              
              Cubicle cubicle1 = new Cubicle("G");
              em.persist(cubicle1);
              
!             scientist1 = new Scientist();
              scientist1.setFirstName("Guy");
              scientist1.setLastName("Pelletier");
              scientist1.setCubicle(cubicle1);
              department.addScientist(scientist1);
              em.persist(scientist1);
          
              Cubicle cubicle2 = new Cubicle("T");
              em.persist(cubicle2);
              
!             scientist2 = new Scientist();
              scientist2.setFirstName("Tom");
              scientist2.setLastName("Ware");
              scientist2.setCubicle(cubicle2);
              department.addScientist(scientist2);
              em.persist(scientist2);
              
              Cubicle cubicle3 = new Cubicle("G");
              em.persist(cubicle3);
              
!             scientist3 = new Scientist();
              scientist3.setFirstName("Gordon");
              scientist3.setLastName("Yorke");
              scientist3.setCubicle(cubicle3);
              department.addScientist(scientist3);
              em.persist(scientist3);
              em.getTransaction().commit();
          } catch (RuntimeException e) {
              if (em.getTransaction().isActive()){
***************
*** 172,177 ****
--- 152,161 ----
              em.close();
              throw e;
          }
+ 
+         m_scientist1PK = scientist1.getPK();
+         m_scientist2PK = scientist2.getPK();
+         m_scientist3PK = scientist3.getPK();
      }
      
      public void testReadDepartment() {
***************
*** 181,194 ****
          assertTrue("The number of scientists were incorrect.", department.getScientists().size() > 0);
      }
      
!     public void testReadJuniorScientist() {
!         JuniorScientist jScientist;
!         
!         try {
!             jScientist = (JuniorScientist) createEntityManager().find(JuniorScientist.class, m_jScientistPK);
!             assertTrue("Error on reading back the junior scientist.", jScientist != null);
!         } catch (Exception e) {
!             assertNull(e.toString(), e);
!         }
      }
  }
--- 165,171 ----
          assertTrue("The number of scientists were incorrect.", department.getScientists().size() > 0);
      }
      
!     public static void main(String[] args) {
!         junit.swingui.TestRunner.main(args);
      }
  }
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/compositepk/CompositePKTableCreator.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.2
Report generated at Thu May  4 15:43:41 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/compositepk/CompositePKTableCreator.java	Thu May  4 15:43:41 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.2	Thu May  4 14:44:36 2006
***************
*** 116,132 ****
          DEPT_LOCATION_field.setUnique(false);
          DEPT_LOCATION_field.setIsIdentity(false);
          table.addField(DEPT_LOCATION_field);
-         
-         FieldDefinition fieldDTYPE = new FieldDefinition();
-         fieldDTYPE.setName("DTYPE");
-         fieldDTYPE.setTypeName("VARCHAR2");
-         fieldDTYPE.setSize(15);
-         fieldDTYPE.setSubSize(0);
-         fieldDTYPE.setIsPrimaryKey(false);
-         fieldDTYPE.setIsIdentity(false);
-         fieldDTYPE.setUnique(false);
-         fieldDTYPE.setShouldAllowNull(true);
-         table.addField(fieldDTYPE);
         
          return table;
      }
--- 116,121 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.40
Report generated at Thu May  4 15:43:41 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java	Thu May  4 15:43:41 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.40	Thu May  4 15:10:57 2006
***************
*** 1020,1061 ****
       * INTERNAL:
       * Process an inheritance subclass.
       */
!     protected void processInheritanceSubclass(MetadataDescriptor descriptor) {
!         if (descriptor.ignoreInheritanceAnnotations()) {
              // Project XML merging. XML wins, ignore annotations/orm xml
!             getLogger().logWarningMessage(MetadataLogger.IGNORE_INHERITANCE, descriptor);
          } else {
              // Log a warning if we are ignoring an entity that has an 
              // inheritance tag.
!             if (descriptor.hasInheritanceTag(descriptor.getJavaClass())) {
!                 getLogger().logWarningMessage(MetadataLogger.IGNORE_INHERITANCE, descriptor);
              }
              
              // Set the parent class on the source descriptor.
!             descriptor.setParentClass();
                  
              // Get the inheritance root descriptor metadata.
!             MetadataDescriptor rootDescriptor = descriptor.getInheritanceRootDmd();
                  
              // Inheritance.stategy() = SINGLE_TABLE, set the flag.
!             if (rootDescriptor.usesSingleTableInheritanceStrategy()) {
!                 descriptor.setSingleTableInheritanceStrategy();
              } else {
                  // Inheritance.stategy() = JOINED, then we need to look for 
                  // primary key join column(s)
!                 for (MetadataJoinColumn mjc : processPrimaryKeyJoinColumns(rootDescriptor.getPrimaryTableName(), descriptor.getPrimaryTableName(), descriptor.getJavaClass(), descriptor)) {
!                 	addMultipleTableKeyField(mjc, getLogger().INHERITANCE_PK_COLUMN, getLogger().INHERITANCE_FK_COLUMN, descriptor);
                  }
              }    
              
              // Process the discriminator value.
!             processDiscriminatorValue(descriptor);
!             
!             // If the root descriptor has an id class, we need to set the same 
!             // id class on our descriptor.
!             if (rootDescriptor.hasCompositePrimaryKey()) {
!                 descriptor.setPKClass(rootDescriptor.getPKClassName());
!             }
          }
      }
      
--- 1020,1057 ----
       * INTERNAL:
       * Process an inheritance subclass.
       */
!     protected void processInheritanceSubclass(MetadataDescriptor md) {
!         if (md.ignoreInheritanceAnnotations()) {
              // Project XML merging. XML wins, ignore annotations/orm xml
!             getLogger().logWarningMessage(MetadataLogger.IGNORE_INHERITANCE, md);
          } else {
              // Log a warning if we are ignoring an entity that has an 
              // inheritance tag.
!             if (md.hasInheritanceTag(md.getJavaClass())) {
!                 getLogger().logWarningMessage(MetadataLogger.IGNORE_INHERITANCE, md);
              }
              
              // Set the parent class on the source descriptor.
!             md.setParentClass();
                  
              // Get the inheritance root descriptor metadata.
!             MetadataDescriptor rootDmd = md.getInheritanceRootDmd();
                  
              // Inheritance.stategy() = SINGLE_TABLE, set the flag.
!             if (rootDmd.usesSingleTableInheritanceStrategy()) {
!                 md.setSingleTableInheritanceStrategy();
              } else {
                  // Inheritance.stategy() = JOINED, then we need to look for 
                  // primary key join column(s)
!                 List joinColumns = processPrimaryKeyJoinColumns(rootDmd.getPrimaryTableName(), md.getPrimaryTableName(), md.getJavaClass(), md);                        
!                 for (Iterator iterator = joinColumns.iterator(); iterator.hasNext();) {
!                 	MetadataJoinColumn mjc = (MetadataJoinColumn) iterator.next();
!                 	addMultipleTableKeyField(mjc, getLogger().INHERITANCE_PK_COLUMN, getLogger().INHERITANCE_FK_COLUMN, md);
                  }
              }    
              
              // Process the discriminator value.
!             processDiscriminatorValue(md);
          }
      }
      
***************
*** 1588,1594 ****
  	/**
  	 * INTERNAL:
  	 */
!     protected abstract List<MetadataJoinColumn> processPrimaryKeyJoinColumns(String sourceTableName, String targetTableName, Object element, MetadataDescriptor md);
      
      /**
       * INTERNAL:
--- 1584,1590 ----
  	/**
  	 * INTERNAL:
  	 */
!     protected abstract List processPrimaryKeyJoinColumns(String sourceTableName, String targetTableName, Object element, MetadataDescriptor md);
      
      /**
       * INTERNAL:
================================================================================
Merge Diffs: /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataDescriptor.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.34
Report generated at Thu May  4 15:43:41 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataDescriptor.java	Thu May  4 15:43:41 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.34	Thu May  4 15:14:46 2006
***************
*** 1215,1229 ****
       * INTERNAL:
       */
      public void setPKClass(Class pkClass) {
-         setPKClass(pkClass.getName());
-     }
-     
-     /**
-      * INTERNAL:
-      */
-     public void setPKClass(String pkClassName) {
          CMP3Policy policy = new CMP3Policy();
!         policy.setPrimaryKeyClassName(pkClassName);
          m_descriptor.setCMPPolicy(policy);
      }
      
--- 1215,1222 ----
       * INTERNAL:
       */
      public void setPKClass(Class pkClass) {
          CMP3Policy policy = new CMP3Policy();
!         policy.setPrimaryKeyClassName(pkClass.getName());
          m_descriptor.setCMPPolicy(policy);
      }
      
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/compositepk/JuniorScientist.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.0
Report generated at Thu May  4 15:50:42 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/compositepk/JuniorScientist.java	Thu May  4 15:43:15 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.0	Thu May  4 16:36:43 2006
***************
*** 1,29 ****
- /*
-  * The contents of this file are subject to the terms 
-  * of the Common Development and Distribution License 
-  * (the "License").  You may not use this file except 
-  * in compliance with the License.
-  * 
-  * You can obtain a copy of the license at 
-  * glassfish/bootstrap/legal/CDDLv1.0.txt or 
-  * https://glassfish.dev.java.net/public/CDDLv1.0.html. 
-  * See the License for the specific language governing 
-  * permissions and limitations under the License.
-  * 
-  * When distributing Covered Code, include this CDDL 
-  * HEADER in each file and include the License file at 
-  * glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable, 
-  * add the following below this CDDL HEADER, with the 
-  * fields enclosed by brackets "[]" replaced with your 
-  * own identifying information: Portions Copyright [yyyy] 
-  * [name of copyright owner]
-  */
- // Copyright (c) 1998, 2006, Oracle. All rights reserved.  
- 
- package oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk;
- 
- import javax.persistence.Entity;
- 
- @Entity
- public class JuniorScientist extends Scientist  {
- }
\ No newline at end of file
--- 0 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/compositepk/AdvancedCompositePKJunitTest.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.4
Report generated at Thu May  4 15:50:42 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/compositepk/AdvancedCompositePKJunitTest.java	Thu May  4 15:43:41 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.4	Thu May  4 14:16:42 2006
***************
*** 28,34 ****
  import oracle.toplink.essentials.sessions.DatabaseSession;
  import oracle.toplink.essentials.testing.framework.junit.JUnitTestCase;
  import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.Cubicle;
- import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.JuniorScientist;
  import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.Scientist;
  import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.ScientistPK;
  import oracle.toplink.essentials.testing.models.cmp3.advanced.compositepk.Department;
--- 28,33 ----
***************
*** 37,43 ****
   
  public class AdvancedCompositePKJunitTest extends JUnitTestCase {
      private static DepartmentPK m_departmentPK;
!     private static ScientistPK m_scientist1PK, m_scientist2PK, m_scientist3PK, m_jScientistPK; 
      
      public AdvancedCompositePKJunitTest() {
          super();
--- 36,42 ----
   
  public class AdvancedCompositePKJunitTest extends JUnitTestCase {
      private static DepartmentPK m_departmentPK;
!     private static ScientistPK m_scientist1PK, m_scientist2PK, m_scientist3PK; 
      
      public AdvancedCompositePKJunitTest() {
          super();
***************
*** 47,56 ****
          super(name);
      }
      
-     public static void main(String[] args) {
-         junit.swingui.TestRunner.main(args);
-     }
-     
      public void setUp() {
          clearCache();
          super.setUp();
--- 46,51 ----
***************
*** 62,68 ****
          suite.addTest(new AdvancedCompositePKJunitTest("testCreateDepartment"));
          suite.addTest(new AdvancedCompositePKJunitTest("testCreateScientists"));
          suite.addTest(new AdvancedCompositePKJunitTest("testReadDepartment"));
-         suite.addTest(new AdvancedCompositePKJunitTest("testReadJuniorScientist"));
  
          return new TestSetup(suite) {
              protected void setUp() {               
--- 57,62 ----
***************
*** 114,169 ****
      }
      
      public void testCreateScientists() {
          EntityManager em = createEntityManager();
          em.getTransaction().begin();
!         
!         try {    
              Department department = (Department) em.merge(em.find(Department.class, m_departmentPK));
              
              Cubicle cubicle1 = new Cubicle("G");
              em.persist(cubicle1);
              
!             Scientist scientist1 = new Scientist();
              scientist1.setFirstName("Guy");
              scientist1.setLastName("Pelletier");
              scientist1.setCubicle(cubicle1);
              department.addScientist(scientist1);
              em.persist(scientist1);
-             m_scientist1PK = scientist1.getPK();
          
              Cubicle cubicle2 = new Cubicle("T");
              em.persist(cubicle2);
              
!             Scientist scientist2 = new Scientist();
              scientist2.setFirstName("Tom");
              scientist2.setLastName("Ware");
              scientist2.setCubicle(cubicle2);
              department.addScientist(scientist2);
              em.persist(scientist2);
-             m_scientist2PK = scientist2.getPK();
              
              Cubicle cubicle3 = new Cubicle("G");
              em.persist(cubicle3);
              
!             Scientist scientist3 = new Scientist();
              scientist3.setFirstName("Gordon");
              scientist3.setLastName("Yorke");
              scientist3.setCubicle(cubicle3);
              department.addScientist(scientist3);
              em.persist(scientist3);
-             m_scientist3PK = scientist3.getPK();
-             
-             Cubicle cubicle4 = new Cubicle("J");
-             em.persist(cubicle4);
-             
-             JuniorScientist jScientist = new JuniorScientist();
-             jScientist.setFirstName("Junior");
-             jScientist.setLastName("Sao");
-             jScientist.setCubicle(cubicle4);
-             department.addScientist(jScientist);
-             em.persist(jScientist);
-             m_jScientistPK = jScientist.getPK();
-             
              em.getTransaction().commit();
          } catch (RuntimeException e) {
              if (em.getTransaction().isActive()){
--- 108,149 ----
      }
      
      public void testCreateScientists() {
+         Scientist scientist1 = null, scientist2 = null, scientist3 = null;
          EntityManager em = createEntityManager();
          em.getTransaction().begin();
!         try {
!             
              Department department = (Department) em.merge(em.find(Department.class, m_departmentPK));
              
              Cubicle cubicle1 = new Cubicle("G");
              em.persist(cubicle1);
              
!             scientist1 = new Scientist();
              scientist1.setFirstName("Guy");
              scientist1.setLastName("Pelletier");
              scientist1.setCubicle(cubicle1);
              department.addScientist(scientist1);
              em.persist(scientist1);
          
              Cubicle cubicle2 = new Cubicle("T");
              em.persist(cubicle2);
              
!             scientist2 = new Scientist();
              scientist2.setFirstName("Tom");
              scientist2.setLastName("Ware");
              scientist2.setCubicle(cubicle2);
              department.addScientist(scientist2);
              em.persist(scientist2);
              
              Cubicle cubicle3 = new Cubicle("G");
              em.persist(cubicle3);
              
!             scientist3 = new Scientist();
              scientist3.setFirstName("Gordon");
              scientist3.setLastName("Yorke");
              scientist3.setCubicle(cubicle3);
              department.addScientist(scientist3);
              em.persist(scientist3);
              em.getTransaction().commit();
          } catch (RuntimeException e) {
              if (em.getTransaction().isActive()){
***************
*** 172,177 ****
--- 152,161 ----
              em.close();
              throw e;
          }
+ 
+         m_scientist1PK = scientist1.getPK();
+         m_scientist2PK = scientist2.getPK();
+         m_scientist3PK = scientist3.getPK();
      }
      
      public void testReadDepartment() {
***************
*** 181,194 ****
          assertTrue("The number of scientists were incorrect.", department.getScientists().size() > 0);
      }
      
!     public void testReadJuniorScientist() {
!         JuniorScientist jScientist;
!         
!         try {
!             jScientist = (JuniorScientist) createEntityManager().find(JuniorScientist.class, m_jScientistPK);
!             assertTrue("Error on reading back the junior scientist.", jScientist != null);
!         } catch (Exception e) {
!             assertNull(e.toString(), e);
!         }
      }
  }
--- 165,171 ----
          assertTrue("The number of scientists were incorrect.", department.getScientists().size() > 0);
      }
      
!     public static void main(String[] args) {
!         junit.swingui.TestRunner.main(args);
      }
  }
================================================================================
Merge Diffs: /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/compositepk/CompositePKTableCreator.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.2
Report generated at Thu May  4 15:50:42 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/compositepk/CompositePKTableCreator.java	Thu May  4 15:43:41 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.2	Thu May  4 14:44:36 2006
***************
*** 116,132 ****
          DEPT_LOCATION_field.setUnique(false);
          DEPT_LOCATION_field.setIsIdentity(false);
          table.addField(DEPT_LOCATION_field);
-         
-         FieldDefinition fieldDTYPE = new FieldDefinition();
-         fieldDTYPE.setName("DTYPE");
-         fieldDTYPE.setTypeName("VARCHAR2");
-         fieldDTYPE.setSize(15);
-         fieldDTYPE.setSubSize(0);
-         fieldDTYPE.setIsPrimaryKey(false);
-         fieldDTYPE.setIsIdentity(false);
-         fieldDTYPE.setUnique(false);
-         fieldDTYPE.setShouldAllowNull(true);
-         table.addField(fieldDTYPE);
         
          return table;
      }
--- 116,121 ----
================================================================================
Merge Diffs: /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.40
Report generated at Thu May  4 15:50:42 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java	Thu May  4 15:43:41 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000005/AB0952363AC40CBFE034080020E8C54E.40	Thu May  4 15:10:57 2006
***************
*** 1020,1061 ****
       * INTERNAL:
       * Process an inheritance subclass.
       */
!     protected void processInheritanceSubclass(MetadataDescriptor descriptor) {
!         if (descriptor.ignoreInheritanceAnnotations()) {
              // Project XML merging. XML wins, ignore annotations/orm xml
!             getLogger().logWarningMessage(MetadataLogger.IGNORE_INHERITANCE, descriptor);
          } else {
              // Log a warning if we are ignoring an entity that has an 
              // inheritance tag.
!             if (descriptor.hasInheritanceTag(descriptor.getJavaClass())) {
!                 getLogger().logWarningMessage(MetadataLogger.IGNORE_INHERITANCE, descriptor);
              }
              
              // Set the parent class on the source descriptor.
!             descriptor.setParentClass();
                  
              // Get the inheritance root descriptor metadata.
!             MetadataDescriptor rootDescriptor = descriptor.getInheritanceRootDmd();
                  
              // Inheritance.stategy() = SINGLE_TABLE, set the flag.
!             if (rootDescriptor.usesSingleTableInheritanceStrategy()) {
!                 descriptor.setSingleTableInheritanceStrategy();
              } else {
                  // Inheritance.stategy() = JOINED, then we need to look for 
                  // primary key join column(s)
!                 for (MetadataJoinColumn mjc : processPrimaryKeyJoinColumns(rootDescriptor.getPrimaryTableName(), descriptor.getPrimaryTableName(), descriptor.getJavaClass(), descriptor)) {
!                 	addMultipleTableKeyField(mjc, getLogger().INHERITANCE_PK_COLUMN, getLogger().INHERITANCE_FK_COLUMN, descriptor);
                  }
              }    
              
              // Process the discriminator value.
!             processDiscriminatorValue(descriptor);
!             
!             // If the root descriptor has an id class, we need to set the same 
!             // id class on our descriptor.
!             if (rootDescriptor.hasCompositePrimaryKey()) {
!                 descriptor.setPKClass(rootDescriptor.getPKClassName());
!             }
          }
      }
      
--- 1020,1057 ----
       * INTERNAL:
       * Process an inheritance subclass.
       */
!     protected void processInheritanceSubclass(MetadataDescriptor md) {
!         if (md.ignoreInheritanceAnnotations()) {
              // Project XML merging. XML wins, ignore annotations/orm xml
!             getLogger().logWarningMessage(MetadataLogger.IGNORE_INHERITANCE, md);
          } else {
              // Log a warning if we are ignoring an entity that has an 
              // inheritance tag.
!             if (md.hasInheritanceTag(md.getJavaClass())) {
!                 getLogger().logWarningMessage(MetadataLogger.IGNORE_INHERITANCE, md);
              }
              
              // Set the parent class on the source descriptor.
!             md.setParentClass();
                  
              // Get the inheritance root descriptor metadata.
!             MetadataDescriptor rootDmd = md.getInheritanceRootDmd();
                  
              // Inheritance.stategy() = SINGLE_TABLE, set the flag.
!             if (rootDmd.usesSingleTableInheritanceStrategy()) {
!                 md.setSingleTableInheritanceStrategy();
              } else {
                  // Inheritance.stategy() = JOINED, then we need to look for 
                  // primary key join column(s)
!                 List joinColumns = processPrimaryKeyJoinColumns(rootDmd.getPrimaryTableName(), md.getPrimaryTableName(), md.getJavaClass(), md);                        
!                 for (Iterator iterator = joinColumns.iterator(); iterator.hasNext();) {
!                 	MetadataJoinColumn mjc = (MetadataJoinColumn) iterator.next();
!                 	addMultipleTableKeyField(mjc, getLogger().INHERITANCE_PK_COLUMN, getLogger().INHERITANCE_FK_COLUMN, md);
                  }
              }    
              
              // Process the discriminator value.
!             processDiscriminatorValue(md);
          }
      }
      
***************
*** 1588,1594 ****
  	/**
  	 * INTERNAL:
  	 */
!     protected abstract List<MetadataJoinColumn> processPrimaryKeyJoinColumns(String sourceTableName, String targetTableName, Object element, MetadataDescriptor md);
      
      /**
       * INTERNAL:
--- 1584,1590 ----
  	/**
  	 * INTERNAL:
  	 */
!     protected abstract List processPrimaryKeyJoinColumns(String sourceTableName, String targetTableName, Object element, MetadataDescriptor md);
      
      /**
       * INTERNAL:
================================================================================
Merge Diffs: /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataDescriptor.java vs. /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.34
Report generated at Thu May  4 15:50:42 2006
--------------------------------------------------------------------------------
*** /ade/gpelleti_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataDescriptor.java	Thu May  4 15:43:41 2006
--- /net/ottnfs1.ca.oracle.com/vol/vol1/ade_ottawa_txn/gpelleti/gpelleti_ri_gf595_060504/ade_storage/000006/AB0952363AC40CBFE034080020E8C54E.34	Thu May  4 15:14:46 2006
***************
*** 1215,1229 ****
       * INTERNAL:
       */
      public void setPKClass(Class pkClass) {
-         setPKClass(pkClass.getName());
-     }
-     
-     /**
-      * INTERNAL:
-      */
-     public void setPKClass(String pkClassName) {
          CMP3Policy policy = new CMP3Policy();
!         policy.setPrimaryKeyClassName(pkClassName);
          m_descriptor.setCMPPolicy(policy);
      }
      
--- 1215,1222 ----
       * INTERNAL:
       */
      public void setPKClass(Class pkClass) {
          CMP3Policy policy = new CMP3Policy();
!         policy.setPrimaryKeyClassName(pkClass.getName());
          m_descriptor.setCMPPolicy(policy);
      }