You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Craig Russell (JIRA)" <ji...@apache.org> on 2005/11/18 00:59:42 UTC

[jira] Commented: (JDO-215) Remove from mapping for HashSetCollections and SetCollections.

    [ http://issues.apache.org/jira/browse/JDO-215?page=comments#action_12357945 ] 

Craig Russell commented on JDO-215:
-----------------------------------

The patch seems right. What the JDO implementation has to do is to recognize that the primary key (if needed) for the join table must be a composite key consisting of the key referencing the owning table and id column from the mapped key. For example,

 CREATE TABLE SET_OF_OBJECT0
 (
     IDENTIFIER INTEGER REFERENCES SET_COLLECTIONS NOT NULL,
     OBJREF BIGINT REFERENCES SIMPLE_CLASS NOT NULL
 );

The primary key for this table (if it is needed by the implementation -- let's discuss this) would be IDENTIFIER plus OBJREF.

 CREATE TABLE SET_OF_OBJECT1
 (
     IDENTIFIER INTEGER REFERENCES SET_COLLECTIONS NOT NULL,
     ID BIGINT NOT NULL,
     INTVAL INTEGER NOT NULL,
     STRINGVAL VARCHAR(128) NOT NULL
);

The primary key for this table would be IDENTIFIER plus ID.


> Remove <order> from mapping for HashSetCollections and SetCollections.
> ----------------------------------------------------------------------
>
>          Key: JDO-215
>          URL: http://issues.apache.org/jira/browse/JDO-215
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Craig Russell
>     Assignee: Michelle Caisse
>  Attachments: JDO-215.patch
>
> The mapping for HashSetCollections and SetCollections incorrectly have <order> columns. 
> There should not be an ordering specified for the join table since duplicates are not allowed. The mapping for application identity should not need a primary key, since the JDO implementation should be able to figure out that the primary key is part of the Map.key, but the datastore identity mapping does need a primary key (and again, I'd use the id field of SimpleClass as the join table key column.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira