db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: last issue with completeness test
Date Tue, 18 Apr 2006 22:23:41 GMT
Hi Erik,

I've filed JIRA JDO-369 for the cleanup issue. And I think you are  
right that this would cause the other cases to fail, since there  
would be duplicate rows in the database (one instance of employee id  
1 for the interface and another with the same id for the class).

Craig

On Apr 15, 2006, at 6:51 PM, Erik Bengtson wrote:

> Hi,
>
> JPOX now passes completeness interface test in my local workspace, but
> apparently the tables are not cleaned out completely on tear down.  
> It passes if
> it is the only configuration enabled. Can someone take a look on that?
>
> Here my changes to the schema and metadata files adding  
> discriminator column to
> tables.
>
> Index: D:/jdo/trunk/tck20/src/sql/derby/datastoreidentity/schema.sql
> ===================================================================
> --- D:/jdo/trunk/tck20/src/sql/derby/datastoreidentity/schema.sql	 
> (revision
> 391636)
> +++ D:/jdo/trunk/tck20/src/sql/derby/datastoreidentity/schema.sql	 
> (working copy)
> @@ -130,6 +130,7 @@
>      STATE CHAR(2),
>      ZIPCODE CHAR(5),
>      COUNTRY VARCHAR(64),
> +    DISCRIMINATOR VARCHAR(255),
>      CONSTRAINT COMPS_PK PRIMARY KEY (DATASTORE_IDENTITY)
>  );
>
> @@ -139,6 +140,7 @@
>      NAME VARCHAR(32) NOT NULL,
>      EMP_OF_THE_MONTH INTEGER,
>      COMPANYID INTEGER REFERENCES companies,
> +    DISCRIMINATOR VARCHAR(255),
>      CONSTRAINT DEPTS_PK PRIMARY KEY (DATASTORE_IDENTITY)
>  );
>
> @@ -185,6 +187,7 @@
>      PROJID INTEGER NOT NULL,
>      NAME VARCHAR(32) NOT NULL,
>      BUDGET DECIMAL(11,2) NOT NULL,
> +    DISCRIMINATOR VARCHAR(255),
>      CONSTRAINT PROJS_UK UNIQUE (PROJID),
>      CONSTRAINT PROJS_PK PRIMARY KEY (DATASTORE_IDENTITY)
>  );
> Index: D:/jdo/trunk/tck20/src/sql/derby/applicationidentity/schema.sql
> ===================================================================
> --- D:/jdo/trunk/tck20/src/sql/derby/applicationidentity/schema.sql	 
> (revision
> 391636)
> +++ D:/jdo/trunk/tck20/src/sql/derby/applicationidentity/schema.sql	 
> (working
> copy)
> @@ -182,6 +182,7 @@
>      STATE CHAR(2),
>      ZIPCODE CHAR(5),
>      COUNTRY VARCHAR(64),
> +    DISCRIMINATOR VARCHAR(255),
>      CONSTRAINT COMPS_PK PRIMARY KEY (ID)
>  );
>
> @@ -190,6 +191,7 @@
>      NAME VARCHAR(32) NOT NULL,
>      EMP_OF_THE_MONTH INTEGER,
>      COMPANYID INTEGER REFERENCES companies,
> +    DISCRIMINATOR VARCHAR(255),
>      CONSTRAINT DEPTS_PK PRIMARY KEY (ID)
>  );
>
> @@ -232,6 +234,7 @@
>      PROJID INTEGER NOT NULL,
>      NAME VARCHAR(32) NOT NULL,
>      BUDGET DECIMAL(11,2) NOT NULL,
> +    DISCRIMINATOR VARCHAR(255),
>      CONSTRAINT PROJS_PK PRIMARY KEY (PROJID)
>  );
>
> Index:
> D:/jdo/trunk/tck20/src/orm/datastoreidentity/org/apache/jdo/tck/pc/ 
> company/package-standard.orm
> ===================================================================
> ---
> D:/jdo/trunk/tck20/src/orm/datastoreidentity/org/apache/jdo/tck/pc/ 
> company/package-standard.orm	(revision
> 388908)
> +++
> D:/jdo/trunk/tck20/src/orm/datastoreidentity/org/apache/jdo/tck/pc/ 
> company/package-standard.orm	(working
> copy)
> @@ -11,6 +11,11 @@
>
>          <class name="Company" table="companies">
>              <datastore-identity strategy="identity"
> column="DATASTORE_IDENTITY"/>
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="COM_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <field name="companyid" column="ID"/>
>              <field name="name" column="NAME">
>                <column name="NAME" sql-type="VARCHAR"/>
> @@ -43,6 +48,11 @@
>
>          <class name="Department" table="departments">
>              <datastore-identity strategy="identity"
> column="DATASTORE_IDENTITY"/>
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="DPT_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <field name="deptid" column="ID"/>
>              <field name="name" column="NAME"/>
>              <field name="company" column="COMPANYID"/>
> @@ -149,6 +159,11 @@
>
>          <class name="Project" table="projects">
>              <datastore-identity strategy="identity"
> column="DATASTORE_IDENTITY"/>
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="PRJ_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <field name="projid" column="PROJID"/>
>              <field name="name" column="NAME"/>
>              <field name="budget">
> @@ -168,6 +183,11 @@
>
>          <interface name="ICompany" table="companies">
>              <datastore-identity strategy="identity"
> column="DATASTORE_IDENTITY"/>
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="COM_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <property name="companyid" column="ID"/>
>              <property name="name" column="NAME">
>                <column name="NAME" sql-type="VARCHAR"/>
> @@ -188,6 +208,11 @@
>
>          <interface name="IDepartment" table="departments">
>              <datastore-identity strategy="identity"
> column="DATASTORE_IDENTITY"/>
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="DPT_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <property name="deptid" column="ID"/>
>              <property name="name" column="NAME"/>
>              <property name="company" column="COMPANYID"/>
> @@ -306,6 +331,11 @@
>
>          <interface name="IProject" table="projects">
>              <datastore-identity strategy="identity"
> column="DATASTORE_IDENTITY"/>
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="PRJ_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <property name="projid" column="PROJID"/>
>              <property name="name" column="NAME"/>
>              <property name="budget">
> Index:
> D:/jdo/trunk/tck20/src/orm/applicationidentity/org/apache/jdo/tck/ 
> pc/company/package-standard.orm
> ===================================================================
> ---
> D:/jdo/trunk/tck20/src/orm/applicationidentity/org/apache/jdo/tck/ 
> pc/company/package-standard.orm	(revision
> 388908)
> +++
> D:/jdo/trunk/tck20/src/orm/applicationidentity/org/apache/jdo/tck/ 
> pc/company/package-standard.orm	(working
> copy)
> @@ -10,6 +10,11 @@
>      <package name="org.apache.jdo.tck.pc.company">
>
>          <class name="Company" table="companies">
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="COM_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <field name="companyid" column="ID"/>
>              <field name="name" column="NAME">
>                <column name="NAME" sql-type="VARCHAR"/>
> @@ -29,6 +34,11 @@
>          </class>
>
>          <class name="Department" table="departments">
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="DPT_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <field name="deptid" column="ID"/>
>              <field name="name" column="NAME"/>
>              <field name="company" column="COMPANYID"/>
> @@ -144,6 +154,11 @@
>          </class>
>
>          <class name="Project" table="projects">
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="PRJ_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <field name="projid" column="PROJID"/>
>              <field name="name" column="NAME"/>
>              <field name="budget">
> @@ -164,6 +179,11 @@
>          </class>
>
>          <interface name="ICompany" table="companies">
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="COM_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <property name="companyid" column="ID"/>
>              <property name="name" column="NAME">
>                <column name="NAME" sql-type="VARCHAR"/>
> @@ -183,6 +203,11 @@
>          </interface>
>
>          <interface name="IDepartment" table="departments">
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="DPT_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <property name="deptid" column="ID"/>
>              <property name="name" column="NAME"/>
>              <property name="company" column="COMPANYID"/>
> @@ -224,8 +249,7 @@
>                          <foreign-key/>
>              </property>
>              <property name="reviewedProjects" mapped-by="reviewers">
> -            </property>
> -            <property name="projects" mapped-by="members"/>
> +            </property>            <property name="projects"
> mapped-by="members"/>
>              <property name="team" mapped-by="manager"/>
>              <property name="hradvisees" mapped-by="hradvisor"/>
>          </interface>
> @@ -298,6 +322,11 @@
>          </interface>
>
>          <interface name="IProject" table="projects">
> +            <inheritance strategy="new-table">
> +                <discriminator strategy="class-name"  
> column="DISCRIMINATOR">
> +                    <index name="PRJ_DISCRIMINATOR_INDEX"  
> unique="false"/>
> +                </discriminator>
> +            </inheritance>
>              <property name="projid" column="PROJID"/>
>              <property name="name" column="NAME"/>
>              <property name="budget">
>


Mime
View raw message