db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bouschen <mbo.t...@spree.de>
Subject Re: Issue 145: Mapping Map with embedded PersistenceCapable
Date Wed, 23 Nov 2005 17:31:49 GMT
Hi Andy,

>>I think I now understand your point, which I missed earlier. You
>>don't see a need for a primary key to be defined on a join table.
>>Apparently, JPOX requires this, and there is nothing in the spec
>>currently that addresses the issue at all. Unless we change the spec
>>to disallow the JPOX implementation, it seems that it is de facto a
>>portability issue.
> Hi Craig,
> I mentioned this in one of the original JIRA issues on this subject. Either we 
> define a <primary-key> (to fully-specify the columns to be used, as you say 
> in your proposed wording) or we have a way of defining that no PK is to be 
> defined for that join table. I've no problem with allowing both, which is 
> what Abe is asking for.

I agree JDO should allow both.

> JPOX can implement both, but the spec doesn't define how to say that you have 
> no PK, so consequently how can we ?
> We could interpret no <primary-key> element as saying no PK, but I'm of the 
> opinion that having a PK in a join table is a "best practice" and should be 
> the default behaviour. Consequently I want a different way to say that there 
> is no PK. Maybe something like
> <join primary-key="false">

I'm not sure whether having a PK in a join table is "best practice" in 
general. I think this depends on the data structure. I agree in case of 
a map, because the key needs to be unique and the same holds true for 
sets. But for others the PK on the join table does not add much value, 
does it?

I'm in favor of interpreting a missing <primary-key> element as there is 
no primary key on the join table.

Regards Michael
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			

View raw message