db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Issue 145: Mapping Map with embedded PersistenceCapable
Date Mon, 21 Nov 2005 22:43:08 GMT
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 Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message