db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r609039 [2/2] - in /db/jdo/trunk/tck2-legacy: ./ src/conf/ src/java/org/apache/jdo/tck/ src/java/org/apache/jdo/tck/api/persistencemanager/ src/java/org/apache/jdo/tck/mapping/ src/java/org/apache/jdo/tck/pc/company/ src/java/org/apache/jdo...
Date Fri, 04 Jan 2008 22:42:34 GMT
Added: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyAllRelationships.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyAllRelationships.java?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyAllRelationships.java (added)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyAllRelationships.java Fri Jan  4 14:42:33 2008
@@ -0,0 +1,497 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jdo.tck.mapping;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.jdo.tck.pc.company.Employee;
+import org.apache.jdo.tck.pc.company.FullTimeEmployee;
+import org.apache.jdo.tck.pc.company.IEmployee;
+import org.apache.jdo.tck.pc.company.IProject;
+import org.apache.jdo.tck.pc.company.Project;
+import org.apache.jdo.tck.util.BatchTestRunner;
+
+
+/**
+ *<B>Title:</B>RelationshipManyToManyAllRelationships
+ *<BR>
+ *<B>Keywords:</B> mapping, managed relationships
+ *<BR>
+ *<B>Assertion ID:</B> A15.3-14
+ *<BR>
+ *<B>Assertion Description: Regardless of which side changes the relationship,
+ * flush (whether done as part of commit or explicitly by the user) will modify
+ * the datastore to reflect the change and will update the memory model
+ * for consistency...</B>
+ */
+
+public class RelationshipManyToManyAllRelationships
+        extends AbstractRelationshipTest {
+    
+    String testMethod = null;
+    protected String ASSERTION_FAILED =
+            "Assertion A15-3.14 (RelationshipManyToManyAllRelationships) failed: ";
+
+            Object emp1Oid = null;
+            Object proj1Oid = null;
+            Employee emp1 = null;
+            Project proj1 = null;
+            
+    /**
+     * The <code>main</code> is called when the class
+     * is directly executed from the command line.
+     * @param args The arguments passed to the program.
+     */
+    public static void main(String[] args) {
+        BatchTestRunner.run(RelationshipManyToManyAllRelationships.class);
+    }
+    
+    /**
+     * @see JDO_Test#localSetUp()
+     */
+    protected void localSetUp() {
+        super.localSetUp();
+        if (isTestToBePerformed) {
+             
+            getPM();
+            pm.currentTransaction().begin();
+            
+            emp1Oid = getOidByName("emp1");
+            proj1Oid = getOidByName("proj1");
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            
+            // Preconditions
+            assertTrue(testMethod +
+                    ": Test aborted, precondition is false; " +
+                    "expected emp.getProjects()to be contain proj1",
+                    emp1.getProjects().contains(proj1));
+            assertTrue(testMethod +
+                    ": Test aborted, precondition is false; " +
+                    "expected proj.getMembers() to contain emp1",
+                    proj1.getMembers().contains(emp1));
+        }
+    }
+    
+    /** */
+    public void testSetToNullFromMappedSide() {
+        testMethod = "testSetToNullFromMappedSide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            proj1.setMembers(null);
+            pm.flush();
+            
+            // Postcondition
+            deferredAssertTrue(!emp1.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(
+                    !emp1.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "In new transaction, postcondition is false; " +
+                    "other side of relationship is not set.");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testSetToNullFromMappedbySide() {
+        testMethod = "testSetToNullFromMappedbySide";
+        if (isTestToBePerformed) {  
+            // Set relationship
+            emp1.setProjects(null);
+            pm.flush();
+            
+            // Postcondition
+            deferredAssertTrue(!proj1.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(
+                    !proj1.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "In new transaction, postcondition is false; " +
+                    "other side of relationship is not set.");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+
+    /** */
+    public void testReplaceFromMappedSide() {
+        testMethod = "testReplaceFromMappedSide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            IEmployee empNew = new FullTimeEmployee(100, "Jerry", "Valentine",
+                    "Brown", new Date(500L), new Date(10000L), 125000);
+            pm.makePersistent(empNew);
+            Set members = new HashSet();
+            members.add(empNew);
+            proj1.setMembers(members);
+            Object empNewOid = pm.getObjectId((Object)empNew);
+            pm.flush();
+
+            // Postcondition
+
+            deferredAssertTrue(empNew.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            empNew = (IEmployee)pm.getObjectById(empNewOid);
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(empNew.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set in new pm");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testReplaceFromMappedbySide() {
+        testMethod = "testReplaceFromMappedbySide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            IProject projNew = new Project(99L, "Skunkworks",
+                    new BigDecimal(10000.35));
+            pm.makePersistent(projNew);
+            Set projects = new HashSet();
+            projects.add(projNew);
+            emp1.setProjects(projects);
+            Object projNewOid = pm.getObjectId((Object)projNew);
+            pm.flush();
+
+            // Postcondition
+             deferredAssertTrue(projNew.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            projNew = (Project)pm.getObjectById(projNewOid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+             deferredAssertTrue(projNew.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set in new pm");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+
+    /** */
+    public void testAddNewFromMappedSide() {
+        testMethod = "testAddNewFromMappedSide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            Employee empNew = new FullTimeEmployee(100, "Jerry", "Valentine",
+                    "Brown", new Date(500L), new Date(10000L), 125000);
+            pm.makePersistent(empNew);
+            proj1.addMember(empNew);
+            Object empNewOid = pm.getObjectId((Object)empNew);
+            pm.flush();
+
+            // Postcondition
+
+            deferredAssertTrue(empNew.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            empNew = (Employee)pm.getObjectById(empNewOid);
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(empNew.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set in new pm");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testAddNewFromMappedbySide() {
+        testMethod = "testAddNewFromMappedbySide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            Project projNew = new Project(99L, "Skunkworks",
+                    new BigDecimal(10000.35));
+            pm.makePersistent(projNew);
+            emp1.addProject(projNew);
+            Object projNewOid = pm.getObjectId((Object)projNew);
+            pm.flush();
+
+            // Postcondition
+             deferredAssertTrue(projNew.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            projNew = (Project)pm.getObjectById(projNewOid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+             deferredAssertTrue(projNew.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set in new pm");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    /** */
+    public void testAddExistingFromMappedSide() {
+        testMethod = "testAddExistingFromMappedSide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            Object emp4Oid = getOidByName("emp4");
+            Employee emp4 = (Employee)pm.getObjectById(emp4Oid);
+            proj1.addMember(emp4);
+            pm.flush();
+
+            // Postcondition
+
+            deferredAssertTrue(emp4.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp4 = (Employee)pm.getObjectById(emp4Oid);
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(emp4.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set in new pm");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testAddExistingFromMappedbySide() {
+        testMethod = "testAddExistingFromMappedbySide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            Object proj2Oid = getOidByName("proj2");
+            Project proj2 = (Project)pm.getObjectById(proj2Oid);
+            emp1.addProject(proj2);
+            pm.flush();
+
+            // Postcondition
+             deferredAssertTrue(proj2.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj2 = (Project)pm.getObjectById(proj2Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+             deferredAssertTrue(proj2.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set in new pm");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+
+    /** */
+    public void testRemoveFromMappedSide() {
+        testMethod = "testRemoveFromMappedSide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            proj1.removeMember(emp1);
+            pm.flush();
+            
+            // Postcondition
+            deferredAssertTrue(!emp1.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(
+                    !emp1.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "In new transaction, postcondition is false; " +
+                    "other side of relationship is not set.");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testRemoveFromMappedbySide() {
+        testMethod = "testRemoveFromMappedbySide";
+        if (isTestToBePerformed) {
+                        
+            // Set relationship
+            emp1.removeProject(proj1);
+            pm.flush();
+            
+            // Postcondition
+            deferredAssertTrue(!proj1.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(
+                    !proj1.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "In new transaction, postcondition is false; " +
+                    "other side of relationship is not set.");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    /** */
+    public void testDeleteFromMappedSide() {
+    testMethod = "testDeleteFromMappedSide";
+        if (isTestToBePerformed) {
+            // Set relationship
+            pm.deletePersistent(proj1);
+            pm.flush();
+            
+            // Postcondition
+            deferredAssertTrue(!emp1.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            deferredAssertTrue(
+                    !emp1.getProjects().contains(proj1),
+                    ASSERTION_FAILED + testMethod,
+                    "In new transaction, postcondition is false; " +
+                    "other side of relationship is not set.");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testDeleteFromMappedbySide() {
+        testMethod = "testDeleteFromMappedbySide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            pm.deletePersistent(emp1);
+            pm.flush();
+            
+            // Postcondition
+            deferredAssertTrue(!proj1.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "Postcondition is false; "
+                    + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(
+                    !proj1.getMembers().contains(emp1),
+                    ASSERTION_FAILED + testMethod,
+                    "In new transaction, postcondition is false; " +
+                    "other side of relationship is not set.");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+}

Propchange: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyAllRelationships.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyNoRelationships.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyNoRelationships.java?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyNoRelationships.java (added)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyNoRelationships.java Fri Jan  4 14:42:33 2008
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jdo.tck.mapping;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.jdo.tck.pc.company.Employee;
+import org.apache.jdo.tck.pc.company.FullTimeEmployee;
+import org.apache.jdo.tck.pc.company.Project;
+import org.apache.jdo.tck.util.BatchTestRunner;
+
+
+/**
+ *<B>Title:</B>RelationshipManyToManyNoRelationships
+ *<BR>
+ *<B>Keywords:</B> mapping, managed relationships
+ *<BR>
+ *<B>Assertion ID:</B> A15.3-14
+ *<BR>
+ *<B>Assertion Description: Regardless of which side changes the relationship,
+ * flush (whether done as part of commit or explicitly by the user) will modify
+ * the datastore to reflect the change and will update the memory model
+ * for consistency...</B>
+ */
+
+public class RelationshipManyToManyNoRelationships extends AbstractRelationshipTest {
+    
+    String testMethod = null;
+    protected String ASSERTION_FAILED =
+        "Assertion A15-3.14 (RelationshipManyToManyNoRelationships) failed: ";
+    
+    Object emp1Oid = null;
+    Object proj1Oid = null;
+    Employee emp1 = null;
+    Project proj1 = null;
+    
+    /**
+     * The <code>main</code> is called when the class
+     * is directly executed from the command line.
+     * @param args The arguments passed to the program.
+     */
+    public static void main(String[] args) {
+        BatchTestRunner.run(RelationshipManyToManyNoRelationships.class);
+    }
+        
+    /**
+     * @see JDO_Test#localSetUp()
+     */
+    protected void localSetUp() {
+        super.localSetUp();
+        if (isTestToBePerformed) {
+            getPM();
+            pm.currentTransaction().begin();
+            
+            emp1Oid = getOidByName("emp1");
+            proj1Oid = getOidByName("proj1");
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            
+            // Preconditions
+            assertTrue(testMethod +
+                ": Test aborted, precondition is false; " +
+                "expected emp.getProjects()to be empty",
+                emp1.getProjects().isEmpty());
+            assertTrue(testMethod +
+                ": Test aborted, precondition is false; " +
+                "expected ins.getMembers() to be empty",
+                proj1.getMembers().isEmpty());
+        }
+    }
+    
+    /** */
+    public void testAddFromMappedSide() {
+        testMethod = "testAddFromMappedSide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            Set emps = new HashSet();
+            emps.add(emp1);
+            proj1.setMembers(emps);
+            pm.flush();
+            
+            // Postcondition
+            deferredAssertTrue(emp1.getProjects().contains(proj1),
+                ASSERTION_FAILED + testMethod,
+                "Postcondition is false; "
+                + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(
+                emp1.getProjects().contains(proj1),
+                ASSERTION_FAILED + testMethod,
+                "In new transaction, postcondition is false; " +
+                "other side of relationship is not set.");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testAddFromMappedbySide() {
+        testMethod = "testAddFromMappedbySide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            Set projs = new HashSet();
+            projs.add(proj1);
+            emp1.setProjects(projs);
+            pm.flush();
+            
+            // Postcondition
+            deferredAssertTrue(proj1.getMembers().contains(emp1),
+                ASSERTION_FAILED + testMethod,
+                "Postcondition is false; "
+                + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(
+                proj1.getMembers().contains(emp1),
+                ASSERTION_FAILED + testMethod,
+                "In new transaction, postcondition is false; " +
+                "other side of relationship is not set.");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testReplaceFromMappedSide() {
+        testMethod = "testReplaceFromMappedSide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            Set members = new HashSet();
+            Employee empNew = new FullTimeEmployee(100, "Jerry", "Valentine",
+                "Brown", new Date(500L), new Date(10000L), 125000);
+            pm.makePersistent(empNew);
+            members.add(empNew);
+            proj1.setMembers(members);
+            Object empNewOid = pm.getObjectId(empNew);
+            pm.flush();
+            
+            assertFalse(testMethod + ": Test aborted, precondition is false; " +
+                "expected empNewOid to be non-null", empNewOid == null);
+            
+            // Postcondition
+            
+            deferredAssertTrue(empNew.getProjects().contains(proj1),
+                ASSERTION_FAILED + testMethod,
+                "Postcondition is false; "
+                + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            empNew = (Employee)pm.getObjectById(empNewOid);
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(empNew.getProjects().contains(proj1),
+                ASSERTION_FAILED + testMethod,
+                "Postcondition is false; "
+                + "other side of relationship not set in new pm");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+    
+    /** */
+    public void testReplaceFromMappedbySide() {
+        testMethod = "testReplaceFromMappedbySide";
+        if (isTestToBePerformed) {
+            
+            // Set relationship
+            Set projects = new HashSet();
+            Project projNew = new Project(99L, "Skunkworks",
+                new BigDecimal(10000.35));
+            pm.makePersistent(projNew);
+            projects.add(projNew);
+            emp1.setProjects(projects);
+            Object projNewOid = pm.getObjectId((Object)projNew);
+            pm.flush();
+            
+            assertFalse(testMethod + ": Test aborted, precondition is false; " +
+                "expected projNewOid to be non-null", projNewOid == null);
+            
+            // Postcondition
+            deferredAssertTrue(projNew.getMembers().contains(emp1),
+                ASSERTION_FAILED + testMethod,
+                "Postcondition is false; "
+                + "other side of relationship not set on flush");
+            pm.currentTransaction().commit();
+            cleanupPM();
+            getPM();
+            
+            pm.currentTransaction().begin();
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            projNew = (Project)pm.getObjectById(projNewOid);
+            proj1 = (Project)pm.getObjectById(proj1Oid);
+            deferredAssertTrue(projNew.getMembers().contains(emp1),
+                ASSERTION_FAILED + testMethod,
+                "Postcondition is false; "
+                + "other side of relationship not set in new pm");
+            pm.currentTransaction().commit();
+            
+            failOnError();
+        }
+    }
+
+}

Propchange: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipManyToManyNoRelationships.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1To1Test.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1To1Test.java?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1To1Test.java (added)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1To1Test.java Fri Jan  4 14:42:33 2008
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jdo.tck.mapping;
+
+import java.util.Date;
+import javax.jdo.JDOUserException;
+import org.apache.jdo.tck.pc.company.FullTimeEmployee;
+import org.apache.jdo.tck.pc.company.IEmployee;
+import org.apache.jdo.tck.pc.company.IMedicalInsurance;
+import org.apache.jdo.tck.pc.company.MedicalInsurance;
+import org.apache.jdo.tck.util.BatchTestRunner;
+
+
+/**
+ *<B>Title:</B>RelationshipNegative1To1Test
+ *<BR>
+ *<B>Keywords:</B> mapping, managed relationships
+ *<BR>
+ *<B>Assertion ID:</B> A15.3-14
+ *<BR>
+ *<B>Assertion Description: Regardless of which side changes the relationship,
+ * flush (whether done as part of commit or explicitly by the user) will modify
+ * the datastore to reflect the change and will update the memory model
+ * for consistency...</B>
+ */
+
+public class RelationshipNegative1To1Test extends AbstractRelationshipTest {
+    
+    String testMethod = null;
+    protected String ASSERTION_FAILED =
+        "Assertion A15-3.14 (RelationshipNegative1To1Test) failed: ";
+    
+    Object emp1Oid = null;
+    Object emp2Oid = null;
+    Object medIns1Oid = null;
+    Object medIns2Oid = null;
+    IEmployee emp1 = null;
+    IEmployee emp2 = null;
+    IMedicalInsurance medIns1 = null;
+    IMedicalInsurance medIns2 = null;
+    
+    /**
+     * The <code>main</code> is called when the class
+     * is directly executed from the command line.
+     * @param args The arguments passed to the program.
+     */
+    public static void main(String[] args) {
+        BatchTestRunner.run(RelationshipNegative1To1Test.class);
+    }
+    
+    /**
+     * @see JDO_Test#localSetUp()
+     */
+    protected void localSetUp() {
+        super.localSetUp();
+        if (isTestToBePerformed) {
+            getPM();
+            pm.currentTransaction().begin();
+            
+            emp1Oid = getOidByName("emp1");
+            emp2Oid = getOidByName("emp2");
+            medIns1Oid = getOidByName("medicalIns1");
+            medIns2Oid = getOidByName("medicalIns2");
+            emp1 = (IEmployee)pm.getObjectById(emp1Oid);
+            emp2 = (IEmployee)pm.getObjectById(emp2Oid);
+            medIns1 = (IMedicalInsurance)pm.getObjectById(medIns1Oid);
+            medIns2 = (IMedicalInsurance)pm.getObjectById(medIns2Oid);
+        }
+    }
+    
+    /**
+     * Test that JdoUserException is thrown if two sides of a relationship
+     * do not refer to each other.
+     */
+    public void testA2BbutNotB2AMapped() {
+        testMethod = "testA2BbutNotB2AMapped";
+        if (isTestToBePerformed) {
+            IEmployee empNew = new FullTimeEmployee(99, "Matthew", "", "Adams",
+                new Date(0L), new Date(10000L), 125000);
+            pm.makePersistent(empNew);
+            emp1.setMedicalInsurance(medIns2);
+            medIns2.setEmployee(empNew);
+            doFlush(testMethod);
+        }
+    }
+    
+    /**
+     * Test that JdoUserException is thrown if two sides of a relationship
+     * do not refer to each other.
+     */
+    public void testA2BbutNotB2AMappedBy() {
+        testMethod = "testA2BbutNotB2AMappedBy";
+        if (isTestToBePerformed) {
+            IMedicalInsurance medInsNew = new MedicalInsurance(99,
+                "The American Company", "B");
+            pm.makePersistent(medInsNew);
+            medIns2.setEmployee(emp1);
+            emp1.setMedicalInsurance(medInsNew);
+            doFlush(testMethod);
+        }
+    }
+    
+    /**
+     * Test that JdoUserException is thrown setting mapped side
+     * of a one-to-one relationship and setting the other side to null
+     */
+    public void testSetOtherSideToNullMapped() {
+        testMethod = "testSetOtherSideToNullMapped";
+        if (isTestToBePerformed) {
+            emp1.setMedicalInsurance(medIns2);
+            medIns2.setEmployee(null);
+            doFlush(testMethod);
+        }
+    }
+    
+    /**
+     * Test that JdoUserException is thrown setting mapped by side
+     * of a one-to-one relationship and setting the other side to null
+     */
+    public void testSetOtherSideToNullMappedBy() {
+        testMethod = "testSetOtherSideToNullMappedBy";
+        if (isTestToBePerformed) {
+            medIns2.setEmployee(emp1);
+            emp1.setMedicalInsurance(null);
+            doFlush(testMethod);
+        }
+    }
+    
+    protected void doFlush(String method) {
+        try {
+            pm.flush();
+            fail(ASSERTION_FAILED + testMethod
+                + ": expected JDOUserException on flush!");
+        } catch (JDOUserException jdoe) {
+            // expected exception
+        }
+        pm.currentTransaction().rollback();
+    }
+}

Propchange: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1To1Test.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1ToManyTest.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1ToManyTest.java?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1ToManyTest.java (added)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1ToManyTest.java Fri Jan  4 14:42:33 2008
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jdo.tck.mapping;
+
+import java.util.Date;
+import javax.jdo.JDOUserException;
+import org.apache.jdo.tck.pc.company.Department;
+import org.apache.jdo.tck.pc.company.Employee;
+import org.apache.jdo.tck.pc.company.FullTimeEmployee;
+import org.apache.jdo.tck.util.BatchTestRunner;
+
+
+/**
+ *<B>Title:</B>RelationshipNegative1ToManyTest
+ *<BR>
+ *<B>Keywords:</B> mapping, managed relationships
+ *<BR>
+ *<B>Assertion ID:</B> A15.3-14
+ *<BR>
+ *<B>Assertion Description: Regardless of which side changes the relationship,
+ * flush (whether done as part of commit or explicitly by the user) will modify
+ * the datastore to reflect the change and will update the memory model
+ * for consistency...</B>
+ */
+
+public class RelationshipNegative1ToManyTest extends AbstractRelationshipTest {
+    
+    String testMethod = null;
+    protected String ASSERTION_FAILED =
+        "Assertion A15-3.14 (RelationshipNegative1ToManyTest) failed: ";
+    
+    Object emp1Oid = null;
+    Object dept1Oid = null;
+    Object dept2Oid = null;
+    Employee emp1 = null;
+    Department dept1 = null;
+    Department dept2 = null;
+    
+    /**
+     * The <code>main</code> is called when the class
+     * is directly executed from the command line.
+     * @param args The arguments passed to the program.
+     */
+    public static void main(String[] args) {
+        BatchTestRunner.run(RelationshipNegative1ToManyTest.class);
+    }
+    
+    /**
+     * @see JDO_Test#localSetUp()
+     */
+    protected void localSetUp() {
+        super.localSetUp();
+        if (isTestToBePerformed) {
+            getPM();
+            pm.currentTransaction().begin();
+            
+            emp1Oid = getOidByName("emp1");
+            dept1Oid = getOidByName("dept1");
+            dept2Oid = getOidByName("dept2");
+            emp1 = (Employee)pm.getObjectById(emp1Oid);
+            dept1 = (Department)pm.getObjectById(dept1Oid);
+            dept2 = (Department)pm.getObjectById(dept2Oid);
+        }
+    }
+    
+    /**
+     * Test that JdoUserException is thrown setting one side
+     * of a one-to-many relationship and deleting the other side
+     */
+    public void testDeleteOtherSide() {
+        testMethod = "testDeleteOtherSide";
+        if (isTestToBePerformed) {
+            dept2.addEmployee(emp1);
+            pm.deletePersistent(emp1);
+            doFlush(testMethod);
+        }
+    }
+    
+    /**
+     * adding a related instance (with a single-valued mapped-by relationship 
+     * field) to more than one one-to-many collection relationship
+     */
+    public void testAddToMoreThanOne() {
+        testMethod = "testAddToMoreThanOne";
+        if (isTestToBePerformed) {
+            Employee empNew = new FullTimeEmployee(99, "Matthew", "", "Adams",
+                new Date(0L), new Date(10000L), 125000);
+            pm.makePersistent(empNew);
+            dept1.addEmployee(empNew);
+            dept2.addEmployee(empNew);
+            doFlush(testMethod);
+        }
+    }
+    
+    /**
+     * adding a related instance to a collection and setting the other side 
+     * to a different instance 
+     */
+    public void testAInBbutNotB2A() {
+        testMethod = "testAInBbutNotB2A";
+        if (isTestToBePerformed) {
+            Employee empNew = new FullTimeEmployee(99, "Matthew", "", "Adams",
+                new Date(0L), new Date(10000L), 125000);
+            pm.makePersistent(empNew);
+            dept1.addEmployee(empNew);
+            empNew.setDepartment(dept2);
+            doFlush(testMethod);
+        }
+    }
+    
+    protected void doFlush(String method) {
+        try {
+            pm.flush();
+            fail(ASSERTION_FAILED + testMethod
+                + ": expected JDOUserException on flush!");
+        } catch (JDOUserException jdoe) {
+            // expected exception
+        }
+        pm.currentTransaction().rollback();
+    }
+}

Propchange: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/mapping/RelationshipNegative1ToManyTest.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/company/Project.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/company/Project.java?rev=609039&r1=609038&r2=609039&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/company/Project.java (original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/company/Project.java Fri Jan  4 14:42:33 2008
@@ -176,7 +176,7 @@
     public void setMembers(Set employees) {
         // workaround: create a new HashSet, because fostore does not
         // support LinkedHashSet
-        this.members = (members != null) ? new HashSet(employees) : null;
+        this.members = (employees != null) ? new HashSet(employees) : null;
     }
 
     /** Serialization support: initialize transient fields. */

Added: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java (added)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java Fri Jan  4 14:42:33 2008
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+package org.apache.jdo.tck.pc.newInstance;
+
+/**
+ * This interface represents the persistent state of Address.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+public abstract class AAddress_bad implements IAddress {
+
+    public abstract long getAddrid();
+    public abstract String getStreet();
+    public abstract String getCity();
+    public abstract String getState();
+    public abstract String getZipcode();
+    public abstract String getCountry();
+
+    // Lacks setter, so not a persistent property 
+    //    Expect JDOUserException on pm.newInstance(this)
+    public abstract String getAString();
+    
+    public abstract void setAddrid(long addrid);
+    public abstract void setStreet(String street);
+    public abstract void setCity(String city);
+    public abstract void setState(String state);
+    public abstract void setZipcode(String zipcode);
+    public abstract void setCountry(String country);
+}

Propchange: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java (added)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java Fri Jan  4 14:42:33 2008
@@ -0,0 +1,340 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+ 
+package org.apache.jdo.tck.pc.newInstance;
+
+import java.io.Serializable;
+
+
+/**
+ * This class represents a postal address.
+ */
+public class Address_bad 
+    implements IAddress
+{
+
+    private long    addrid;
+    private String  street;
+    private String  city;
+    private String  state;
+    private String  zipcode;
+    private String  country;
+
+    // Expect JDOUserException on pm.newInstance(this)
+    //    with non-public constructor
+    private Address_bad() {}
+
+    /**
+     * This constructor initializes the <code>Address</code> components.
+     * @param addrid The address ID.
+     * @param street The street address.
+     * @param city The city.
+     * @param state The state.
+     * @param zipcode The zip code.
+     * @param country The zip country.
+     */
+    public Address_bad(long addrid, String street, String city, 
+                   String state, String zipcode, String country)
+    {
+        this.addrid = addrid;
+        this.street = street;
+        this.city = city;
+        this.state = state;
+        this.zipcode = zipcode;
+        this.country = country;
+    }
+
+    public String getAString() {
+        return "A String";
+    }
+
+    /**
+     * Get the addrid associated with this object.
+     * @return the addrid.
+     */
+    public long getAddrid() {
+        return addrid;
+    }
+
+    /**
+     * Set the id associated with this object.
+     * @param id the id.
+     */
+    public void setAddrid(long id) {
+        if (this.addrid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.addrid = id;
+    }
+
+    /** 
+     * Get the street component of the address.
+     * @return The street component of the address.
+     */
+    public String getStreet() {
+        return street;
+    }
+
+    /**
+     * Set the street component of the address.
+     * @param street The street component.
+     */
+    public void setStreet(String street) {
+        this.street = street;
+    }
+
+    /**
+     * Get the city.
+     * @return The city component of the address.
+     */
+    public String getCity() {
+        return city;
+    }
+
+    /**
+     * Set the city component of the address.
+     * @param city The city.
+     */
+    public void setCity(String city) {
+        this.city = city;
+    }
+    
+    /**
+     * Get the state component of the address.
+     * @return The state.
+     */
+    public String getState() {
+        return state;
+    }
+
+    /**
+     * Set the state component of the address.
+     * @param state The state.
+     */
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    /**
+     * Get the zipcode component of the address.
+     * @return The zipcode.
+     */
+    public String getZipcode() {
+        return zipcode;
+    }
+
+    /**
+     * Set the zip code component of the address.
+     * @param zipcode The zipcode.
+     */
+    public void setZipcode(String zipcode) {
+        this.zipcode = zipcode;
+    }
+
+    /**
+     * Get the country component of the address.
+     * @return The country.
+     */
+    public String getCountry() {
+        return country;
+    }
+
+    /**
+     * Set the country component of the address.
+     * @param country The country.
+     */
+    public void setCountry(String country) {
+        this.country = country;
+    }
+
+    /**
+     * Returns a String representation of a <code>Address</code> object.
+     * @return a String representation of a <code>Address</code> object.
+     */
+    public String toString() {
+        return "Address(" + getFieldRepr() + ")";
+    }
+    
+    /**
+     * Returns a String representation of the non-relationship fields.
+     * @return a String representation of the non-relationship fields.
+     */
+    protected String getFieldRepr() {
+        StringBuffer rc = new StringBuffer();
+        rc.append(addrid);
+        rc.append(", street ").append(street);
+        rc.append(", city ").append(city);
+        rc.append(", state ").append(state);
+        rc.append(", zipcode ").append(zipcode);
+        rc.append(", country ").append(country);
+        return rc.toString();
+    }
+
+//    /** 
+//     * Returns <code>true</code> if all the fields of this instance are
+//     * deep equal to the coresponding fields of the specified Person.
+//     * @param other the object with which to compare.
+//     * @param helper EqualityHelper to keep track of instances that have
+//     * already been processed. 
+//     * @return <code>true</code> if all the fields are deep equal;
+//     * <code>false</code> otherwise.  
+//     * @throws ClassCastException if the specified instances' type prevents
+//     * it from being compared to this instance. 
+//     */
+//    public boolean deepCompareFields(Object other, 
+//                                     EqualityHelper helper) {
+//        IAddress otherAddress = (IAddress)other;
+//        String where = "Address<" + addrid + ">";
+//        return
+//            helper.equals(addrid, otherAddress.getAddrid(), where + ".addrid") &
+//            helper.equals(street, otherAddress.getStreet(), where + ".street") &
+//            helper.equals(city, otherAddress.getCity(), where + ".city") &
+//            helper.equals(state, otherAddress.getState(), where + ".state") &
+//            helper.equals(zipcode, otherAddress.getZipcode(), where + ".zipcode") &
+//            helper.equals(country, otherAddress.getCountry(), where + ".country");
+//    }
+//    
+//    /** 
+//     * Compares this object with the specified object for order. Returns a
+//     * negative integer, zero, or a positive integer as this object is less
+//     * than, equal to, or greater than the specified object. 
+//     * @param o The Object to be compared. 
+//     * @return a negative integer, zero, or a positive integer as this 
+//     * object is less than, equal to, or greater than the specified object. 
+//     * @throws ClassCastException - if the specified object's type prevents
+//     * it from being compared to this Object. 
+//     */
+//    public int compareTo(Object o) {
+//        return compareTo((IAddress)o);
+//    }
+//
+//    /** 
+//     * Compare two instances. This is a method in Comparator.
+//     */
+//    public int compare(Object o1, Object o2) {
+//        return compare((IAddress)o1, (IAddress)o2);
+//    }
+//
+//    /** 
+//     * Compares this object with the specified Address object for
+//     * order. Returns a negative integer, zero, or a positive integer as
+//     * this object is less than, equal to, or greater than the specified
+//     * object.  
+//     * @param other The Address object to be compared. 
+//     * @return a negative integer, zero, or a positive integer as this
+//     * object is less than, equal to, or greater than the specified Address
+//     * object. 
+//     */
+//    public int compareTo(IAddress other) {
+//        return compare(this, other);
+//    }
+//    
+//    /**
+//     * Compares its two IAddress arguments for order. Returns a negative
+//     * integer, zero, or a positive integer as the first argument is less
+//     * than, equal to, or greater than the second. 
+//     * @param o1 the first IAddress object to be compared. 
+//     * @param o2 the second IAddress object to be compared. 
+//     * @return a negative integer, zero, or a positive integer as the first
+//     * object is less than, equal to, or greater than the second object. 
+//     */
+//    public static int compare(IAddress o1, IAddress o2) {
+//        return EqualityHelper.compare(o1.getAddrid(), o2.getAddrid());
+//    }
+//
+//    /** 
+//     * Indicates whether some other object is "equal to" this one.
+//     * @param obj the object with which to compare.
+//     * @return <code>true</code> if this object is the same as the obj
+//     * argument; <code>false</code> otherwise. 
+//     */
+//    public boolean equals(Object obj) {
+//        if (obj instanceof IAddress) {
+//            return compareTo((IAddress)obj) == 0;
+//        }
+//        return false;
+//    }
+
+    /**
+     * Returns a hash code value for the object. 
+     * @return a hash code value for this object.
+     */
+    public int hashCode() {
+        return (int)addrid;
+    }
+    
+    /**
+     * This class is used to represent the application identifier 
+     * for the <code>Address</code> class.
+     */
+    public static class Oid implements Serializable, Comparable {
+
+        /**
+         * This is the identifier field for <code>Address</code> and must
+         * correspond in type and name to the field in
+         * <code>Address</code>. 
+         */
+        public long addrid;
+        
+        /** The required public, no-arg constructor. */
+        public Oid()
+        {
+            addrid = 0;
+        }
+
+        /**
+         * A constructor to initialize the identifier field.
+         * @param addrid the id of the Address.
+         */
+        public Oid(long addrid) {
+            this.addrid = addrid;
+        }
+        
+        public Oid(String s) { addrid = Long.parseLong(justTheId(s)); }
+
+        public String toString() { return this.getClass().getName() + ": "  + addrid;}
+
+
+        /** */
+        public boolean equals(java.lang.Object obj) {
+            if( obj==null || !this.getClass().equals(obj.getClass()) )
+                return( false );
+            Oid o = (Oid) obj;
+            if( this.addrid != o.addrid ) return( false );
+            return( true );
+        }
+
+        /** */
+        public int hashCode() {
+            return( (int) addrid );
+        }
+        
+        protected static String justTheId(String str) {
+            return str.substring(str.indexOf(':') + 1);
+        }
+
+        /** */
+        public int compareTo(Object obj) {
+            // may throw ClassCastException which the user must handle
+            Oid other = (Oid) obj;
+            if( addrid < other.addrid ) return -1;
+            if( addrid > other.addrid ) return 1;
+            return 0;
+        }
+
+    }
+
+}

Propchange: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java (added)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java Fri Jan  4 14:42:33 2008
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+package org.apache.jdo.tck.pc.newInstance;
+
+/**
+ * This interface represents the persistent state of Address.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+public interface IAddress_bad {
+
+    long getAddrid();
+    String getStreet();
+    String getCity();
+    String getState();
+    String getZipcode();
+    String getCountry();
+
+    // Lacks setter, so not a persistent property
+    //   Expect JDOUserException on pm.newInstance(this)
+    String getAString();
+    
+    void setAddrid(long addrid);
+    void setStreet(String street);
+    void setCity(String city);
+    void setState(String state);
+    void setZipcode(String zipcode);
+    void setCountry(String country);
+}

Propchange: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo (added)
+++ db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo Fri Jan  4 14:42:33 2008
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo 
+	http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+    <package name="org.apache.jdo.tck.pc.newInstance">
+
+        <class name="AAddress_bad" persistence-modifier="persistence-capable"
+            identity-type="application"
+            objectid-class="org.apache.jdo.tck.pc.newInstance.Address$Oid">
+            <property name="addrid" persistence-modifier="persistent"
+                    primary-key="true"/>
+            <property name="street" persistence-modifier="persistent"/>
+            <property name="city" persistence-modifier="persistent"/>
+            <property name="state" persistence-modifier="persistent"/>
+            <property name="zipcode" persistence-modifier="persistent"/>
+            <property name="country" persistence-modifier="persistent"/>
+        </class>
+    </package>
+</jdo>

Propchange: db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo (added)
+++ db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo Fri Jan  4 14:42:33 2008
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo 
+	http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+    <package name="org.apache.jdo.tck.pc.newInstance">
+
+        <class name="Address_bad"
+            identity-type="application"
+            objectid-class="org.apache.jdo.tck.pc.newInstance.Address$Oid">
+            <field name="addrid" primary-key="true"/>
+        </class>
+
+    </package>
+</jdo>

Propchange: db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo (added)
+++ db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo Fri Jan  4 14:42:33 2008
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo 
+	http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+    <package name="org.apache.jdo.tck.pc.newInstance">
+
+        <interface name="IAddress_bad"
+            identity-type="application"
+            objectid-class="org.apache.jdo.tck.pc.newInstance.Address$Oid">
+            <property name="addrid" persistence-modifier="persistent"
+                    primary-key="true"/>
+            <property name="street" persistence-modifier="persistent"/>
+            <property name="city" persistence-modifier="persistent"/>
+            <property name="state" persistence-modifier="persistent"/>
+            <property name="zipcode" persistence-modifier="persistent"/>
+            <property name="country" persistence-modifier="persistent"/>
+        </interface>
+    </package>
+</jdo>

Propchange: db/jdo/trunk/tck2-legacy/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo (added)
+++ db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo Fri Jan  4 14:42:33 2008
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo 
+	http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has datastore identity.
+-->
+    <package name="org.apache.jdo.tck.pc.newInstance">
+
+         <class name="AAddress_bad" persistence-modifier="persistence-capable"
+            identity-type="datastore">
+            <property name="addrid" persistence-modifier="persistent"/>
+            <property name="street" persistence-modifier="persistent"/>
+            <property name="city" persistence-modifier="persistent"/>
+            <property name="state" persistence-modifier="persistent"/>
+            <property name="zipcode" persistence-modifier="persistent"/>
+            <property name="country" persistence-modifier="persistent"/>
+        </class>
+
+    </package>
+</jdo>

Propchange: db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo (added)
+++ db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo Fri Jan  4 14:42:33 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo 
+	http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has datastore identity.
+-->
+    <package name="org.apache.jdo.tck.pc.newInstance">
+
+        <class name="Address_bad" identity-type="datastore">
+            <field name="addrid" persistence-modifier="persistent"/>
+            <field name="street" persistence-modifier="persistent"/>
+            <field name="city" persistence-modifier="persistent"/>
+            <field name="state" persistence-modifier="persistent"/>
+            <field name="zipcode" persistence-modifier="persistent"/>
+            <field name="country" persistence-modifier="persistent"/>
+        </class>
+
+    </package>
+</jdo>

Propchange: db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo?rev=609039&view=auto
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo (added)
+++ db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo Fri Jan  4 14:42:33 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo 
+	http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has datastore identity.
+-->
+    <package name="org.apache.jdo.tck.pc.newInstance">
+
+        <interface name="IAddress_bad" identity-type="datastore">
+            <property name="addrid" persistence-modifier="persistent"/>
+            <property name="street" persistence-modifier="persistent"/>
+            <property name="city" persistence-modifier="persistent"/>
+            <property name="state" persistence-modifier="persistent"/>
+            <property name="zipcode" persistence-modifier="persistent"/>
+            <property name="country" persistence-modifier="persistent"/>
+        </interface>
+
+    </package>
+</jdo>

Propchange: db/jdo/trunk/tck2-legacy/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: db/jdo/trunk/tck2-legacy/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm?rev=609039&r1=609038&r2=609039&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm (original)
+++ db/jdo/trunk/tck2-legacy/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm Fri Jan  4 14:42:33 2008
@@ -87,6 +87,69 @@
               <column name="COUNTRY" allows-null="true"/>
             </property>
         </class>
+        
+        <class name="Address_bad" table="address">
+            <field name="addrid">
+              <column name="ADDRID" allows-null="true"/>
+            </field>
+            <field name="street">
+              <column name="STREET" allows-null="true"/>
+            </field>
+            <field name="city">
+              <column name="CITY" allows-null="true"/>
+            </field>
+            <field name="state">
+              <column name="STATE" allows-null="true"/>
+            </field>
+            <field name="zipcode">
+              <column name="ZIPCODE" allows-null="true"/>
+            </field>
+            <field name="country">
+              <column name="COUNTRY" allows-null="true"/>
+            </field>
+        </class>
+
+        <interface name="IAddress_bad" table="address">
+            <property name="addrid">
+              <column name="ADDRID" allows-null="true"/>
+            </property>
+            <property name="street">
+              <column name="STREET" allows-null="true"/>
+            </property>
+            <property name="city">
+              <column name="CITY" allows-null="true"/>
+            </property>
+            <property name="state">
+              <column name="STATE" allows-null="true"/>
+            </property>
+            <property name="zipcode">
+              <column name="ZIPCODE" allows-null="true"/>
+            </property>
+            <property name="country">
+              <column name="COUNTRY" allows-null="true"/>
+            </property>
+         </interface>
+            
+         <class name="AAddress_bad" table="address">
+            <property name="addrid">
+              <column name="ADDRID" allows-null="true"/>
+            </property>
+            <property name="street">
+              <column name="STREET" allows-null="true"/>
+            </property>
+            <property name="city">
+              <column name="CITY" allows-null="true"/>
+            </property>
+            <property name="state">
+              <column name="STATE" allows-null="true"/>
+            </property>
+            <property name="zipcode">
+              <column name="ZIPCODE" allows-null="true"/>
+            </property>
+            <property name="country">
+              <column name="COUNTRY" allows-null="true"/>
+            </property>
+        </class>
 
     </package>
 </orm>

Modified: db/jdo/trunk/tck2-legacy/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm?rev=609039&r1=609038&r2=609039&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm (original)
+++ db/jdo/trunk/tck2-legacy/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm Fri Jan  4 14:42:33 2008
@@ -82,5 +82,62 @@
             </property>
         </class>
 
+        <class name="Address_bad" table="address">
+            <datastore-identity strategy="identity"
+                column="DATASTORE_IDENTITY"/>
+            <field name="addrid" column="ADDRID"/>
+            <field name="street" column="STREET"/>
+            <field name="city" column="CITY"/>
+            <field name="state" column="STATE"/>
+            <field name="zipcode" column="ZIPCODE"/>
+            <field name="country" column="COUNTRY"/>
+        </class>
+
+        <interface name="IAddress_bad" table="address">
+            <datastore-identity strategy="identity"
+                column="DATASTORE_IDENTITY"/>
+            <property name="addrid">
+              <column name="ADDRID" allows-null="true"/>
+            </property>
+            <property name="street">
+              <column name="STREET" allows-null="true"/>
+            </property>
+            <property name="city">
+              <column name="CITY" allows-null="true"/>
+            </property>
+            <property name="state">
+              <column name="STATE" allows-null="true"/>
+            </property>
+            <property name="zipcode">
+              <column name="ZIPCODE" allows-null="true"/>
+            </property>
+            <property name="country">
+              <column name="COUNTRY" allows-null="true"/>
+            </property>
+        </interface>
+            
+        <class name="AAddress_bad" table="address">
+            <datastore-identity strategy="identity"
+                column="DATASTORE_IDENTITY"/>
+            <property name="addrid">
+              <column name="ADDRID" allows-null="true"/>
+            </property>
+            <property name="street">
+              <column name="STREET" allows-null="true"/>
+            </property>
+            <property name="city">
+              <column name="CITY" allows-null="true"/>
+            </property>
+            <property name="state">
+              <column name="STATE" allows-null="true"/>
+            </property>
+            <property name="zipcode">
+              <column name="ZIPCODE" allows-null="true"/>
+            </property>
+            <property name="country">
+              <column name="COUNTRY" allows-null="true"/>
+            </property>
+        </class>
+
     </package>
 </orm>



Mime
View raw message