You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by br...@apache.org on 2005/12/08 16:37:17 UTC

svn commit: r355126 - in /incubator/jdo/trunk/tck20: ./ test/conf/ test/java/org/apache/jdo/tck/mapping/ test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/ test/sql/derby/datastoreidentity/

Author: brazil
Date: Thu Dec  8 07:36:56 2005
New Revision: 355126

URL: http://svn.apache.org/viewcvs?rev=355126&view=rev
Log:
JDO-167: Inheritance mapping 2 needs to be changed to support polymorphic relationships to Employees.

Modified:
    incubator/jdo/trunk/tck20/maven.xml
    incubator/jdo/trunk/tck20/test/conf/alltests.conf
    incubator/jdo/trunk/tck20/test/conf/applicationidentity.conf
    incubator/jdo/trunk/tck20/test/conf/company1-1Relationships.conf
    incubator/jdo/trunk/tck20/test/conf/company1-MRelationships.conf
    incubator/jdo/trunk/tck20/test/conf/companyAllRelationships.conf
    incubator/jdo/trunk/tck20/test/conf/companyEmbedded.conf
    incubator/jdo/trunk/tck20/test/conf/companyM-MRelationships.conf
    incubator/jdo/trunk/tck20/test/conf/companyNoRelationships.conf
    incubator/jdo/trunk/tck20/test/conf/datastoreidentity.conf
    incubator/jdo/trunk/tck20/test/conf/detach.conf
    incubator/jdo/trunk/tck20/test/conf/inheritance1.conf
    incubator/jdo/trunk/tck20/test/conf/inheritance2.conf
    incubator/jdo/trunk/tck20/test/conf/inheritance3.conf
    incubator/jdo/trunk/tck20/test/conf/inheritance4.conf
    incubator/jdo/trunk/tck20/test/conf/schemaAttributeClass.conf
    incubator/jdo/trunk/tck20/test/conf/schemaAttributeOrm.conf
    incubator/jdo/trunk/tck20/test/conf/schemaAttributePackage.conf
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/mapping/CompletenessTest.java
    incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby2.orm
    incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema2.sql

Modified: incubator/jdo/trunk/tck20/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/maven.xml?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/maven.xml (original)
+++ incubator/jdo/trunk/tck20/maven.xml Thu Dec  8 07:36:56 2005
@@ -317,6 +317,8 @@
                          value="${jdo.tck.log.directory}/${timestamp}"/>
             <sysproperty key="jdo.tck.cleanupaftertest"
                          value="${jdo.tck.cleanupaftertest}"/>             
+            <sysproperty key="jdo.tck.requiredOptions"
+                         value="${jdo.tck.requiredOptions}"/>
             <jvmarg line="${database.runtck.sysproperties}"/>
             <jvmarg line="${iut.runtck.sysproperties}"/>
             <arg line="${jdo.tck.classes}"/>
@@ -365,7 +367,9 @@
             <sysproperty key="jdo.tck.log.directory"
                          value="${jdo.tck.log.directory}/${timestamp}"/>
             <sysproperty key="jdo.tck.cleanupaftertest"
-                         value="${jdo.tck.cleanupaftertest}"/>                         
+                         value="${jdo.tck.cleanupaftertest}"/>
+            <sysproperty key="jdo.tck.requiredOptions"
+                         value="${jdo.tck.requiredOptions}"/>
             <jvmarg line="${database.runtck.sysproperties}"/>
             <jvmarg line="${jdo.runtck.sysproperties}"/>
             <arg line="${jdo.tck.classes}"/>

Modified: incubator/jdo/trunk/tck20/test/conf/alltests.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/alltests.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/alltests.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/alltests.conf Thu Dec  8 07:36:56 2005
@@ -2,6 +2,7 @@
 jdo.tck.testdata = 
 jdo.tck.standarddata = 
 jdo.tck.mapping = 0
+jdo.tck.requiredOptions =
 jdo.tck.classes = \
 org.apache.jdo.tck.api.instancecallbacks.AccessOtherInstancesInPrestore \
 org.apache.jdo.tck.api.instancecallbacks.AccessingFieldsInPredelete \

Modified: incubator/jdo/trunk/tck20/test/conf/applicationidentity.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/applicationidentity.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/applicationidentity.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/applicationidentity.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.identitytype = applicationidentity
 jdo.tck.testclasses = ${jdo.tck.alltests}
 jdo.tck.schema = schema1.sql
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/company1-1Relationships.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/company1-1Relationships.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/company1-1Relationships.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/company1-1Relationships.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
 jdo.tck.testdata = org/apache/jdo/tck/pc/company/company1-1Relationships.xml
 jdo.tck.mapping = 0
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/company1-MRelationships.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/company1-MRelationships.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/company1-MRelationships.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/company1-MRelationships.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
 jdo.tck.testdata = org/apache/jdo/tck/pc/company/company1-MRelationships.xml
 jdo.tck.mapping = 0
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/companyAllRelationships.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/companyAllRelationships.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/companyAllRelationships.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/companyAllRelationships.conf Thu Dec  8 07:36:56 2005
@@ -3,3 +3,4 @@
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
 jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyAllRelationships.xml
 jdo.tck.mapping = 0
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/companyEmbedded.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/companyEmbedded.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/companyEmbedded.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/companyEmbedded.conf Thu Dec  8 07:36:56 2005
@@ -3,3 +3,4 @@
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
 jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyEmbedded.xml
 jdo.tck.mapping = 0
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/companyM-MRelationships.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/companyM-MRelationships.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/companyM-MRelationships.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/companyM-MRelationships.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
 jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyM-MRelationships.xml
 jdo.tck.mapping = 0
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/companyNoRelationships.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/companyNoRelationships.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/companyNoRelationships.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/companyNoRelationships.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
 jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyNoRelationships.xml
 jdo.tck.mapping = 0
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/datastoreidentity.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/datastoreidentity.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/datastoreidentity.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/datastoreidentity.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.identitytype = datastoreidentity
 jdo.tck.testclasses = ${jdo.tck.alltests}
 jdo.tck.schema = schema2.sql
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/detach.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/detach.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/detach.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/detach.conf Thu Dec  8 07:36:56 2005
@@ -5,3 +5,4 @@
 jdo.tck.classes = \
     org.apache.jdo.tck.api.persistencemanager.detach.SetDetachAllOnCommit \
     org.apache.jdo.tck.api.persistencemanager.detach.GetDetachAllOnCommit
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/inheritance1.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/inheritance1.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/inheritance1.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/inheritance1.conf Thu Dec  8 07:36:56 2005
@@ -3,5 +3,6 @@
 Each table contains columns for the declared fields. \
 Inheritance strategy: new-table for all classes.
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
-jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyNoRelationships.xml
+jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyAllRelationships.xml
 jdo.tck.mapping = 1
+jdo.tck.requiredOptions = 

Modified: incubator/jdo/trunk/tck20/test/conf/inheritance2.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/inheritance2.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/inheritance2.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/inheritance2.conf Thu Dec  8 07:36:56 2005
@@ -10,5 +10,6 @@
 and parttime employees. \
 Inheritance strategy: new-table for all classes.
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
-jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyNoRelationships.xml
+jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyAllRelationships.xml
 jdo.tck.mapping = 2
+jdo.tck.requiredOptions = javax.jdo.option.UnionJoin

Modified: incubator/jdo/trunk/tck20/test/conf/inheritance3.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/inheritance3.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/inheritance3.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/inheritance3.conf Thu Dec  8 07:36:56 2005
@@ -5,5 +5,6 @@
 Insurance has inheritance strategy "subclass-table". \
 MedicalInsurance and DentalInsurance have inheritance strategy "new-table".
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
-jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyNoRelationships.xml
+jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyAllRelationships.xml
 jdo.tck.mapping = 3
+jdo.tck.requiredOptions = 

Modified: incubator/jdo/trunk/tck20/test/conf/inheritance4.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/inheritance4.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/inheritance4.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/inheritance4.conf Thu Dec  8 07:36:56 2005
@@ -3,5 +3,6 @@
 PartTimeEmployee, FullTimeEmployee, MedicalInsurance, and DentalInsurance \
 have inheritance strategy "superclass-table".
 jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
-jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyNoRelationships.xml
+jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyAllRelationships.xml
 jdo.tck.mapping = 4
+jdo.tck.requiredOptions = 

Modified: incubator/jdo/trunk/tck20/test/conf/schemaAttributeClass.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/schemaAttributeClass.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/schemaAttributeClass.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/schemaAttributeClass.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.classes = org.apache.jdo.tck.api.persistencemanager.lifecycle.MakePersistent
 jdo.tck.testdata = 
 jdo.tck.mapping = 7
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/schemaAttributeOrm.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/schemaAttributeOrm.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/schemaAttributeOrm.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/schemaAttributeOrm.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.classes = org.apache.jdo.tck.api.persistencemanager.lifecycle.MakePersistent
 jdo.tck.testdata = 
 jdo.tck.mapping = 5
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/conf/schemaAttributePackage.conf
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/conf/schemaAttributePackage.conf?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/conf/schemaAttributePackage.conf (original)
+++ incubator/jdo/trunk/tck20/test/conf/schemaAttributePackage.conf Thu Dec  8 07:36:56 2005
@@ -2,3 +2,4 @@
 jdo.tck.classes = org.apache.jdo.tck.api.persistencemanager.lifecycle.MakePersistent
 jdo.tck.testdata = 
 jdo.tck.mapping = 6
+jdo.tck.requiredOptions =

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/mapping/CompletenessTest.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/mapping/CompletenessTest.java?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/mapping/CompletenessTest.java (original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/mapping/CompletenessTest.java Thu Dec  8 07:36:56 2005
@@ -16,21 +16,15 @@
 
 package org.apache.jdo.tck.mapping;
 
-import java.lang.reflect.Constructor;
-
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-
-import javax.jdo.PersistenceManager;
-import javax.jdo.JDOException;
+import java.util.StringTokenizer;
 
 import org.apache.jdo.tck.JDO_Test;
-
-import org.apache.jdo.tck.pc.company.CompanyFactory;
 import org.apache.jdo.tck.pc.company.CompanyFactoryRegistry;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
-
 import org.apache.jdo.tck.util.BatchTestRunner;
 import org.apache.jdo.tck.util.DeepEquality;
 import org.apache.jdo.tck.util.EqualityHelper;
@@ -66,64 +60,87 @@
     public static void main(String[] args) {
         BatchTestRunner.run(CompletenessTest.class);
     }
+
+    private boolean isTestToBePerformed() {
+        boolean isTestToBePerformed = true;
+        String requiredOptions = System.getProperty("jdo.tck.requiredOptions");
+        Collection supportedOptions = getPMF().supportedOptions();
+        StringTokenizer tokenizer = new StringTokenizer(requiredOptions, " ,");
+        while (tokenizer.hasMoreTokens()) {
+            String token = tokenizer.nextToken();
+            if (!token.equals("") &&
+                !supportedOptions.contains(token)) {
+                isTestToBePerformed = false;
+                int index = getClass().getName().lastIndexOf('.');
+                String testName = index==-1 ? 
+                        getClass().getName() : getClass().getName().substring(index+1);
+                printUnsupportedOptionalFeatureNotTested(testName, token);
+                break;
+            }
+        }
+        return isTestToBePerformed;
+    }
     
     /**
      * @see JDO_Test#localSetUp()
      */
     protected void localSetUp() {
-        getPM();
-        CompanyFactoryRegistry.registerFactory(pm);
-        CompanyModelReader reader = new CompanyModelReader(inputFilename);
-        // persist test data
-        pm.currentTransaction().begin();
-        List rootList = reader.getRootList();
-        pm.makePersistentAll(rootList);
-        addTearDownClass(reader.getTearDownClasses());
-        rootOids = new ArrayList();
-        for (Iterator i = rootList.iterator(); i.hasNext(); ) {
-            Object pc = i.next();
-            rootOids.add(pm.getObjectId(pc));
+        if (isTestToBePerformed()) {
+            getPM();
+            CompanyFactoryRegistry.registerFactory(pm);
+            CompanyModelReader reader = new CompanyModelReader(inputFilename);
+            // persist test data
+            pm.currentTransaction().begin();
+            List rootList = reader.getRootList();
+            addTearDownClass(CompanyModelReader.getTearDownClasses());
+            pm.makePersistentAll(rootList);
+            rootOids = new ArrayList();
+            for (Iterator i = rootList.iterator(); i.hasNext(); ) {
+                Object pc = i.next();
+                rootOids.add(pm.getObjectId(pc));
+            }
+            pm.currentTransaction().commit();
+            cleanupPM();
         }
-        pm.currentTransaction().commit();
-        cleanupPM();
     }
 
     /** */
     public void test() {
-        
-        // register the default factory
-        CompanyFactoryRegistry.registerFactory();
-        // get new obj graph to compare persistent graph with
-        CompanyModelReader reader = new CompanyModelReader(inputFilename);
-        List rootList = reader.getRootList();
-        
-        getPM();
-        pm.currentTransaction().begin();
-        // compare persisted and new
-        int size = rootList.size();
-        StringBuffer msg = new StringBuffer();
-        for (int i = 0; i < size; i++) {
-            DeepEquality expected = (DeepEquality) rootList.get(i);
-            Object oid = rootOids.get(i);
-            Object persisted = pm.getObjectById(oid);
-            EqualityHelper equalityHelper = new EqualityHelper();
-            if (!expected.deepCompareFields(persisted, equalityHelper)) {
-                if (msg.length() > 0) {
-                    msg.append("\n");
+        if (isTestToBePerformed()) {
+            // register the default factory
+            CompanyFactoryRegistry.registerFactory();
+            // get new obj graph to compare persistent graph with
+            CompanyModelReader reader = new CompanyModelReader(inputFilename);
+            List rootList = reader.getRootList();
+            
+            getPM();
+            pm.currentTransaction().begin();
+            // compare persisted and new
+            int size = rootList.size();
+            StringBuffer msg = new StringBuffer();
+            for (int i = 0; i < size; i++) {
+                DeepEquality expected = (DeepEquality) rootList.get(i);
+                Object oid = rootOids.get(i);
+                Object persisted = pm.getObjectById(oid);
+                EqualityHelper equalityHelper = new EqualityHelper();
+                if (!expected.deepCompareFields(persisted, equalityHelper)) {
+                    if (msg.length() > 0) {
+                        msg.append("\n");
+                    }
+                    msg.append("Expected this  instance:\n    " + 
+                            expected + "\n" +
+                            "Got persistent instance:" + "\n    " + 
+                            persisted + "\n" +
+                            "Detailed list of differences follows...\n");
+                    msg.append(equalityHelper.getUnequalBuffer());
                 }
-                msg.append("Expected this  instance:\n    " + 
-                        expected + "\n" +
-                        "Got persistent instance:" + "\n    " + 
-                        persisted + "\n" +
-                        "Detailed list of differences follows...\n");
-                msg.append(equalityHelper.getUnequalBuffer());
             }
-        }
-        pm.currentTransaction().commit();
-        // fail test if at least one of the instances is not the expected one
-        if (msg.length() > 0) {
-            fail("CompletenessTest failed; see list of failures below:", 
-                    msg.toString());
+            pm.currentTransaction().commit();
+            // fail test if at least one of the instances is not the expected one
+            if (msg.length() > 0) {
+                fail("CompletenessTest failed; see list of failures below:", 
+                        msg.toString());
+            }
         }
     }
 }

Modified: incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby2.orm
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby2.orm?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby2.orm (original)
+++ incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby2.orm Thu Dec  8 07:36:56 2005
@@ -50,7 +50,8 @@
         </class>
 
         <class name="PartTimeEmployee" table="parttimeemployees">
-            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
+            <datastore-identity strategy="sequence" column="DATASTORE_IDENTITY"
+                sequence="org.apache.jdo.tck.pc.PersonSequence"/>
             <inheritance strategy="new-table"/>
             <field name="Person.personid" column="PERSONID"/>
             <field name="Person.firstname" column="FIRSTNAME"/>
@@ -103,7 +104,8 @@
         </class>
 
         <class name="FullTimeEmployee" table="fulltimeemployees">
-            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
+            <datastore-identity strategy="sequence" column="DATASTORE_IDENTITY"
+                sequence="org.apache.jdo.tck.pc.PersonSequence"/>
             <inheritance strategy="new-table"/>
             <field name="Person.personid" column="PERSONID"/>
             <field name="Person.firstname" column="FIRSTNAME"/>
@@ -160,7 +162,8 @@
         </class>
 
         <class name="Person" table="persons">
-            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
+            <datastore-identity strategy="sequence" column="DATASTORE_IDENTITY"
+                sequence="org.apache.jdo.tck.pc.PersonSequence"/>
             <inheritance strategy="new-table"/>
             <field name="personid" column="PERSONID"/>
             <field name="firstname" column="FIRSTNAME"/>
@@ -188,7 +191,8 @@
         </class>
 
         <class name="DentalInsurance" table="dentalinsurance">
-            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
+            <datastore-identity strategy="sequence" column="DATASTORE_IDENTITY"
+                sequence="org.apache.jdo.tck.pc.InsuranceSequence"/>
             <inheritance strategy="new-table"/>
             <field name="Insurance.insid" column="INSID"/>
             <field name="Insurance.carrier" column="CARRIER"/>
@@ -199,7 +203,8 @@
         </class>
 
         <class name="MedicalInsurance" table="medicalinsurance">
-            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
+            <datastore-identity strategy="sequence" column="DATASTORE_IDENTITY"
+                sequence="org.apache.jdo.tck.pc.InsuranceSequence"/>
             <inheritance strategy="new-table"/>
             <field name="Insurance.insid" column="INSID"/>
             <field name="Insurance.carrier" column="CARRIER"/>
@@ -227,5 +232,11 @@
                 <element column="MEMBER"/>
             </field>
         </class>
+
+        <sequence name="org.apache.jdo.tck.pc.PersonSequence" 
+            strategy="nontransactional"/>
+
+        <sequence name="org.apache.jdo.tck.pc.InsuranceSequence" 
+            strategy="nontransactional"/>
     </package>
 </orm>

Modified: incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema2.sql
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema2.sql?rev=355126&r1=355125&r2=355126&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema2.sql (original)
+++ incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema2.sql Thu Dec  8 07:36:56 2005
@@ -64,7 +64,7 @@
 );
 
 CREATE TABLE persons (
-    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    DATASTORE_IDENTITY INTEGER NOT NULL,
     PERSONID INTEGER UNIQUE NOT NULL,
     FIRSTNAME VARCHAR(32) NOT NULL,
     LASTNAME VARCHAR(32) NOT NULL,
@@ -80,7 +80,7 @@
 );
 
 CREATE TABLE fulltimeemployees (
-    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    DATASTORE_IDENTITY INTEGER NOT NULL,
     PERSONID INTEGER UNIQUE NOT NULL,
     FIRSTNAME VARCHAR(32) NOT NULL,
     LASTNAME VARCHAR(32) NOT NULL,
@@ -104,7 +104,7 @@
 );
 
 CREATE TABLE parttimeemployees (
-    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    DATASTORE_IDENTITY INTEGER NOT NULL,
     PERSONID INTEGER UNIQUE NOT NULL,
     FIRSTNAME VARCHAR(32) NOT NULL,
     LASTNAME VARCHAR(32) NOT NULL,
@@ -128,7 +128,7 @@
 );
 
 CREATE TABLE medicalinsurance (
-    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    DATASTORE_IDENTITY INTEGER NOT NULL,
     INSID INTEGER,
     CARRIER VARCHAR(64) NOT NULL,
     EMPLOYEE INTEGER REFERENCES fulltimeemployees,
@@ -137,7 +137,7 @@
 );
 
 CREATE TABLE dentalinsurance (
-    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    DATASTORE_IDENTITY INTEGER NOT NULL,
     INSID INTEGER,
     CARRIER VARCHAR(64) NOT NULL,
     EMPLOYEE INTEGER REFERENCES fulltimeemployees,