db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject svn commit: r369994 - in /db/jdo/trunk/tck20/test: orm/applicationidentity/org/apache/jdo/tck/pc/shoppingcart/ orm/datastoreidentity/org/apache/jdo/tck/pc/shoppingcart/ sql/derby/applicationidentity/ sql/derby/datastoreidentity/
Date Wed, 18 Jan 2006 01:06:53 GMT
Author: madams
Date: Tue Jan 17 17:06:40 2006
New Revision: 369994

URL: http://svn.apache.org/viewcvs?rev=369994&view=rev
Log:
JDO-272 Update to schema & mappings to include version columns for use with detachment.

Modified:
    db/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm
    db/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm
    db/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema8.sql
    db/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema8.sql

Modified: db/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm?rev=369994&r1=369993&r2=369994&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm
(original)
+++ db/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm
Tue Jan 17 17:06:40 2006
@@ -8,12 +8,16 @@
     <package name="org.apache.jdo.tck.pc.shoppingcart">
 
         <class name="Cart" table="CARTS">
+            <version strategy="version-number" column="VERSION"/>
+
             <field name="id" column="CART_ID"/>
             <field name="customerId" column="CUSTOMER_ID"/>
             <field name="entries" mapped-by="cart"/>
         </class>
 
         <class name="CartEntry" table="CART_ENTRIES">
+            <version strategy="version-number" column="VERSION"/>
+
             <field name="id" column="ID"/>
             <field name="quantity" column="QUANTITY"/>
             <field name="product" column="SKU" foreign-key="true"/>
@@ -21,11 +25,15 @@
         </class>
 
         <class name="Product" table="PRODUCTS">
+            <version strategy="version-number" column="VERSION"/>
+
             <field name="sku" column="SKU"/>
             <field name="description" column="DESCRIPTION"/>
         </class>
 
         <class name="Undetachable" table="UNDETACHABLES">
+            <version strategy="version-number" column="VERSION"/>
+
             <field name="id" column="ID"/>
             <field name="foo" column="FOO"/>
             <field name="bar" column="BAR"/>

Modified: db/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm?rev=369994&r1=369993&r2=369994&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm
(original)
+++ db/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/shoppingcart/package-derby8.orm
Tue Jan 17 17:06:40 2006
@@ -2,13 +2,14 @@
 <!DOCTYPE orm PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Mapping Metadata
2.0//EN" "http://java.sun.com/dtd/orm_2_0.dtd">
 <!--
 This file contains the schema information when an implementation
-has application identity.
+has datastore identity.
 -->
 <orm>
     <package name="org.apache.jdo.tck.pc.shoppingcart">
 
         <class name="Cart" table="CARTS">
             <datastore-identity strategy="increment" column="DATASTORE_ID"/>
+            <version strategy="version-number" column="VERSION"/>
 
             <field name="id" column="CART_ID"/>
             <field name="customerId" column="CUSTOMER_ID"/>
@@ -17,6 +18,7 @@
 
         <class name="CartEntry" table="CART_ENTRIES">
             <datastore-identity strategy="increment" column="DATASTORE_ID"/>
+            <version strategy="version-number" column="VERSION"/>
 
             <field name="id" column="ID"/>
             <field name="quantity" column="QUANTITY"/>
@@ -26,6 +28,7 @@
 
         <class name="Product" table="PRODUCTS">
             <datastore-identity strategy="uuid-hex" column="DATASTORE_ID"/>
+            <version strategy="version-number" column="VERSION"/>
 
             <field name="sku" column="SKU"/>
             <field name="description" column="DESCRIPTION"/>
@@ -33,6 +36,7 @@
 
         <class name="Undetachable" table="UNDETACHABLES">
             <datastore-identity strategy="increment" column="DATASTORE_ID"/>
+            <version strategy="version-number" column="VERSION"/>
 
             <field name="id" column="ID"/>
             <field name="foo" column="FOO"/>

Modified: db/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema8.sql
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema8.sql?rev=369994&r1=369993&r2=369994&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema8.sql (original)
+++ db/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema8.sql Tue Jan 17 17:06:40
2006
@@ -13,6 +13,7 @@
 CREATE TABLE CARTS (
     CART_ID BIGINT NOT NULL,
     CUSTOMER_ID VARCHAR(128) NOT NULL,
+    VERSION INTEGER NOT NULL DEFAULT 0,
 
     CONSTRAINT CARTS_PK PRIMARY KEY (CART_ID)
 );
@@ -20,6 +21,7 @@
 CREATE TABLE PRODUCTS (
     SKU VARCHAR(48) NOT NULL,
     DESCRIPTION VARCHAR(128),
+    VERSION INTEGER NOT NULL DEFAULT 0,
 
     CONSTRAINT PRODUCTS_PK PRIMARY KEY (SKU)
 );
@@ -29,6 +31,7 @@
     QUANTITY INTEGER DEFAULT 0,
     CART_ID BIGINT NOT NULL,
     SKU VARCHAR(48) NOT NULL,
+    VERSION INTEGER NOT NULL DEFAULT 0,
 
     CONSTRAINT CART_ENTRIES_PK  PRIMARY KEY (ID),
     CONSTRAINT CARTS_FK         FOREIGN KEY (CART_ID)   REFERENCES CARTS,
@@ -39,6 +42,7 @@
     ID BIGINT NOT NULL,
     FOO INTEGER,
     BAR INTEGER,
+    VERSION INTEGER NOT NULL DEFAULT 0,
 
     CONSTRAINT UNDETACHABLES_PK PRIMARY KEY (ID)
 );

Modified: db/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema8.sql
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema8.sql?rev=369994&r1=369993&r2=369994&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema8.sql (original)
+++ db/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema8.sql Tue Jan 17 17:06:40 2006
@@ -15,6 +15,7 @@
     DATASTORE_ID BIGINT NOT NULL,
     CART_ID BIGINT NOT NULL,
     CUSTOMER_ID VARCHAR(128) NOT NULL,
+    VERSION INTEGER NOT NULL DEFAULT 0,
 
     CONSTRAINT CARTS_PK PRIMARY KEY (DATASTORE_ID),
     CONSTRAINT CARTS_UK UNIQUE      (CART_ID)
@@ -25,6 +26,7 @@
     DATASTORE_ID VARCHAR(48) NOT NULL,
     SKU VARCHAR(48) NOT NULL,
     DESCRIPTION VARCHAR(128),
+    VERSION INTEGER NOT NULL DEFAULT 0,
 
     CONSTRAINT PRODUCTS_PK  PRIMARY KEY  (DATASTORE_ID),
     CONSTRAINT PRODUCTS_UK  UNIQUE       (SKU)
@@ -37,6 +39,7 @@
     QUANTITY INTEGER DEFAULT 0,
     CART_ID BIGINT NOT NULL,
     SKU VARCHAR(48) NOT NULL,
+    VERSION INTEGER NOT NULL DEFAULT 0,
 
     CONSTRAINT CART_ENTRIES_PK  PRIMARY KEY (DATASTORE_ID),
     CONSTRAINT CART_ENTRIES_UK  UNIQUE      (ID),
@@ -50,6 +53,7 @@
     ID BIGINT NOT NULL,
     FOO INTEGER,
     BAR INTEGER,
+    VERSION INTEGER NOT NULL DEFAULT 0,
 
     CONSTRAINT UNDETACHABLES_PK PRIMARY KEY (DATASTORE_ID),
     CONSTRAINT UNDETACHABLES_UK UNIQUE      (ID)



Mime
View raw message