db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abe White <awh...@bea.com>
Subject Re: Issue 145: Mapping Map with embedded PersistenceCapable
Date Tue, 22 Nov 2005 02:42:20 GMT
> 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.

The only requirements for using objects in a Map in Java are that  
they implement hashCode and equals properly.  How do you go from that  
contract to "needs a primary key in the database map table"? 
  

Mime
View raw message