db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Minutes: JDO TCK Conference Call Friday, Aug 19, 9 am PST
Date Fri, 26 Aug 2005 08:52:54 GMT
Hi Craig,

> > Feedback : CollectionCollections has a field Object1 that is a
> > Collection<SimpleClass> embedded in the join table. The TCK is
> > expecting a
> > schema with join table having columns for the FK back to the owner
> > object,
> > and the fields for the element. JPOX looks at this from a different
> > angle and
> > requires a PK on this join table and so, since we don't have an id
> > for the
> > embedded SimpleClass, we add an "adapter index" column to form the
> > PK. As has
> > been discussed in the past, the user has no obvious way of saying
> > that they
> > don't want a PK applying to the join table. They have the <primary-
> > key>
> > element but that is only currently for specifying the pk name.
> There is a natural PK for the join table. It's a combination of the
> FK plus the column mapped to the id field. If this were defined to be
> the PK for the join table in the schema, would that work?

If the implementation can be handed a definition of the columns to use in the 
PK for the join table, then the implementation can use that, and saves it 
having to resort to adding its own magic - which would be a good thing from a 
TCK perspective.

In this particular case as you say, the SimpleClass has a field "id" that is 
persistent, and so will be present in the join table whilst embedded and, as 
long as its value is consistent with use as part of the PK, could be used as 

Looking at the PFD 18.7, I see you've added that the user can specify 
<join table="...">
    <primary-key name="...">
        <column name="..."/>
        <column name="..."/>
You'll just have to give me time to implement this ;-). JPOX supports the 
<primary-key name="..."/> syntax but not the subelement columns yet.

Section 18.7 doesn't mention what happens if the user doesn't specify this PK 
definition, consequently JPOX will just define the PK how it does at the 
moment if nothing is provided.

Java Persistent Objects - JPOX

View raw message