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

Craig Russell commented on JDO-211:
-----------------------------------

1. Let's take the example of application identity for 
MapStringValueCollections, and its field "MapOfObject_String3". 

The key for this map is SimpleClass. The metadata for SimpleClass says that the 
primary key field of the class is "id". So JPOX knows that there is a key 
object embedded in the join table that has a primary key field, and that field 
can be used as the primary key of the join table.

2. Take the case of datastore identity for MapStringValueCollections, and its 
field "MapOfObject_String3". 

The key for this map is SimpleClass. The metadata for SimpleClass doesn't 
identify a primary key (duh. It's datastore identity). So JPOX has no idea that 
there is a key field in the key object. Therefore, the orm metadata needs to 
identify a key column for the join table, and I'd suggest using the id column 
as the key, as Andy suggests.

Sadly, the HashSetCollections and SetCollections have <order> columns which is 
not correct. There should not be an ordering specified for the join table since 
duplicates are not allowed. So the mapping for application identity should not 
need a primary 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.

> SQL Exception: 'ADPT_PK_IDX' is not a column in table or VTI 
> 'APPLICATIONIDENTITY0.HASHMAP_OBJECT0_STR'.
> --------------------------------------------------------------------------------------------------------
>
>          Key: JDO-211
>          URL: http://issues.apache.org/jira/browse/JDO-211
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Michelle Caisse
>     Assignee: Andy Jefferson

>
> Test*MapStringValueCollections there is a mismatch between orm and schema.

-- 
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

Reply via email to