db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r220215 - in /incubator/jdo/trunk/tck20/test: orm/applicationidentity/org/apache/jdo/tck/pc/company/ orm/datastoreidentity/org/apache/jdo/tck/pc/company/ sql/derby/applicationidentity/ sql/derby/datastoreidentity/
Date Thu, 21 Jul 2005 23:56:26 GMT
Author: mcaisse
Date: Thu Jul 21 16:56:25 2005
New Revision: 220215

URL: http://svn.apache.org/viewcvs?rev=220215&view=rev
Log:
Add <foreign-key name> to company metadata

Modified:
    incubator/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-derby.orm
    incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby.orm
    incubator/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema.sql
    incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema.sql

Modified: incubator/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-derby.orm
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-derby.orm?rev=220215&r1=220214&r2=220215&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-derby.orm
(original)
+++ incubator/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-derby.orm
Thu Jul 21 16:56:25 2005
@@ -65,7 +65,11 @@
             <field name="hradvisor" column="HRADVISOR">
                         <foreign-key/>
             </field>
-            <field name="reviewedProjects" mapped-by="reviewers"/>
+            <field name="reviewedProjects" mapped-by="reviewers">
+                <element>
+                    <foreign-key name="PR_PROJ_FK"/>
+                </element>
+            </field>
             <field name="projects" mapped-by="members"/>
             <field name="team" mapped-by="manager"/>
             <field name="hradvisees" mapped-by="hradvisor"/>
@@ -125,7 +129,9 @@
             </field>
             <field name="reviewers" table="project_reviewer">
                 <join column="PROJID"/>
-                <element column="REVIEWER"/>
+                <element column="REVIEWER">
+                    <foreign-key name="PR_PROJ_FK"/>
+                </element>
             </field>
             <field name="members" table="project_member">
                 <join column="PROJID"/>

Modified: incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby.orm
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby.orm?rev=220215&r1=220214&r2=220215&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby.orm
(original)
+++ incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-derby.orm
Thu Jul 21 16:56:25 2005
@@ -67,7 +67,11 @@
             <field name="hradvisor" column="HRADVISOR">
                         <foreign-key/>
             </field>
-            <field name="reviewedProjects" mapped-by="reviewers"/>
+            <field name="reviewedProjects" mapped-by="reviewers">
+                <element>
+                    <foreign-key name="PR_PROJ_FK"/>
+                </element>
+            </field>
             <field name="projects" mapped-by="members"/>
             <field name="team" mapped-by="manager"/>
             <field name="hradvisees" mapped-by="hradvisor"/>
@@ -130,7 +134,9 @@
             </field>
             <field name="reviewers" table="project_reviewer">
                 <join column="PROJID"/>
-                <element column="REVIEWER"/>
+                <element column="REVIEWER">
+                    <foreign-key name="PR_REV_FK"/>
+                </element>
             </field>
             <field name="members" table="project_member">
                 <join column="PROJID"/>

Modified: incubator/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema.sql
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema.sql?rev=220215&r1=220214&r2=220215&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema.sql (original)
+++ incubator/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema.sql Thu Jul 21 16:56:25
2005
@@ -127,6 +127,8 @@
 -------------------------
 
 ALTER TABLE departments DROP CONSTRAINT EMP_MO_FK;
+ALTER TABLE project_reviewer DROP CONSTRAINT PR_PROJ_FK FOREIGN KEY;
+ALTER TABLE project_reviewer DROP CONSTRAINT PR_MEM_FK FOREIGN KEY;
 DROP TABLE insuranceplans;
 DROP TABLE project_reviewer;
 DROP TABLE project_member;
@@ -205,8 +207,8 @@
 );
 
 CREATE TABLE project_member (
-    PROJID INTEGER REFERENCES projects NOT NULL,
-    MEMBER INTEGER REFERENCES persons NOT NULL
+    PROJID INTEGER NOT NULL,
+    MEMBER INTEGER NOT NULL
 );
 
 CREATE TABLE employee_phoneno_type (
@@ -214,6 +216,13 @@
     PHONENO VARCHAR(16) NOT NULL,
     TYPE VARCHAR(16) NOT NULL
 );
+
+ALTER TABLE project_reviewer 
+    ADD CONSTRAINT PR_PROJ_FK FOREIGN KEY
+        (PROJID) REFERENCES projects(PROJID)
+    ADD CONSTRAINT PR_REV_FK FOREIGN KEY
+        (REVIEWER) REFERENCES persons(PERSONID)
+;
 
 ALTER TABLE departments 
     ADD CONSTRAINT EMP_MO_FK FOREIGN KEY

Modified: incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema.sql
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema.sql?rev=220215&r1=220214&r2=220215&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema.sql (original)
+++ incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema.sql Thu Jul 21 16:56:25
2005
@@ -70,6 +70,8 @@
 -------------------------
 
 ALTER TABLE departments DROP CONSTRAINT EMP_MO_FK;
+ALTER TABLE project_reviewer DROP CONSTRAINT PR_PROJ_FK FOREIGN KEY;
+ALTER TABLE project_reviewer DROP CONSTRAINT PR_MEM_FK FOREIGN KEY;
 DROP TABLE insuranceplans;
 DROP TABLE project_reviewer;
 DROP TABLE project_member;
@@ -162,6 +164,13 @@
     PHONENO VARCHAR(16) NOT NULL,
     TYPE VARCHAR(16) NOT NULL
 );
+
+ALTER TABLE project_reviewer 
+    ADD CONSTRAINT PR_PROJ_FK FOREIGN KEY
+        (PROJID) REFERENCES projects(PROJID)
+    ADD CONSTRAINT PR_REV_FK FOREIGN KEY
+        (REVIEWER) REFERENCES persons(PERSONID)
+;
 
 ALTER TABLE departments 
     ADD CONSTRAINT EMP_MO_FK FOREIGN KEY



Mime
View raw message