Hi Abe,

On Nov 21, 2005, at 12:59 PM, Abe White wrote:

The issue came up with the TCK where we were trying to get JPOX to recognize that an embedded PersistenceCapable in a join table can have a unique identifying field. In the case of datastore identity, this doesn't work because there is no primary key field in the PersistenceCapable.

<proposed 18.14>
A portable mapping for arrays, collections, and maps will include a primary key on the join table.
</proposed 18.14>

Why? I don't understand this at all. "Datastore identity" is meaningless in this context, as embedded objects have no identity according to the spec.

Right. They have no persistent identity. Therefore, if you want to use an embedded PersistenceCapable as a key, you need to identify one of the embedded fields as a key for the purpose of the map. The alternative is to simply disallow using an embedded PersistenceCapable as a key in a map if the class is defined as datastore identity. But this seems pretty arbitrary.

Craig

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Reply via email to