db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg von Frantzius <joerg.von.frantz...@artnology.com>
Subject Re: [Fwd: last issue with completeness test]
Date Tue, 18 Apr 2006 16:22:58 GMT
Craig Russell schrieb:
> Hi Erik,
>
> It's probably not related to the problem, but why do you declare an
> index defined on the discriminator columns in the metadata?
>   
Yes I'm not Erik but still: in our production system we do that to 
increase performance of queries. We'd even like to have that by default.
> The only other odd thing is the change to projects: <property
> name="projects" mapped-by="members"/>
>
> There's nothing else that I can see that would cause a problem
> deleting instances. Where does the error show up?
>
> Craig
>
> P.S. until Monday, please reply to papajdo@gmail.com in addition to jdo-dev.
>
> On 4/15/06, Michelle Caisse <Michelle.Caisse@sun.com> wrote:
>   
>>  -------- Original Message --------
>> Subject: last issue with completeness test
>> Date: Sat, 15 Apr 2006 18:51:11 -0700
>> From: Erik Bengtson <erik@jpox.org>
>> Reply-To: jdo-dev@db.apache.org
>> To: jdo-dev@db.apache.org
>>
>>  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
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message