db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject 18.15.8 <order mapped-by="..."/> clarification
Date Sat, 10 Feb 2007 18:57:56 GMT
Section 18.15.8 says
If the array or list field is mapped using the mapped-by attribute in the 
field metadata, then the ordering can be mapped to a field in the same class. 
In this case, use the mapped-by attribute in the order metadata to name the 
field containing the ordering data.

This doesn't say whether the List is operated as an "indexed List" (where the 
JDO implementation will insert element index positions into the column 
defined by the mapped-by field in the element table - and that this mapped-by 
field should hence be integer based so it can store these indices), or 
whether it will be an "ordered List" (like JPA, where the elements in the 
List are retrieved using the ordering defined by the mapped-by column) and 
the values defined by the element objects in that field will govern the 
position in the list on retrieval. 

My interpretation has always been the first one, since if the user has taken 
the time to insert elements into their List in an order then when they 
retrieve the List they should be in the same order.

Also in section 18.15.8 we also have
The serialized attribute specifies that the key values are to be serialized 
into the named column.

I think that this should be removed since <order> has no serialized, and its 
just a cut and paste from somewhere.


View raw message