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: [Jdo Wiki] Update of "MappingCollections" by MichelleCaisse
Date Fri, 14 Oct 2005 23:00:20 GMT
Hi,

Just one comment. When mapping using PC key, serialized-key doesn't  
make sense. (In fact, I wonder why it's in the spec. except for  
completeness).

Craig

On Oct 14, 2005, at 2:20 PM, Apache Wiki wrote:

> Dear Wiki user,
>
> You have subscribed to a wiki page or wiki category on "Jdo Wiki"  
> for change notification.
>
> The following page has been changed by MichelleCaisse:
> http://wiki.apache.org/jdo/MappingCollections
>
> ---------------------------------------------------------------------- 
> --------
>   == Maps of Persistence Capable (PC) Types ==
>
> - These are maps where either the key or value is a PC type. We  
> test the following cases:
> + These are maps where either the key or value is a PC type. We  
> test the following cases, assuming a String key and PC value:
>    * Collection field is serialized in the main table ('''s''')
> -  * Both key and value are embedded in a join table, the PC member  
> of the mapped pair is mapped to a foreign key to a secondary table  
> ('''efk''')
> +  * String key is embedded in a join table; the PC value is mapped  
> to a foreign key column in the join table. The fk references the  
> primary key of the table containing the PC. ('''efk''') (default)
> -  * PC key or value is serialized in a join table, the non-PC  
> member of the mapped pair is stored in another column of the join  
> table ('''es''')
> +  * PC value is serialized in a join table, the String key of the  
> mapped pair is stored in another column of the join table. ('''es''')
> +  * PC value and String key are embedded in a join table. ('''ee''')
>
>   == Maps of Java Types ==
> - These are maps where both key and value are Java types. We test  
> the following cases:
> + These are maps where the key is a String and the value is a Java  
> type, for example Date, Locale, Integer. We test the following cases:
>    * Collection field is serialized in the main table ('''s''')
> -  * Both key and value are embedded in a join table ('''efk''')
> +  * Both key and value are embedded in a join table ('''ee''')
>
>   == Metadata for Maps ==
>   The metadata for these cases, assuming the key is a String and  
> the value is a PC type, is:
>   ||case||jdo metadata||orm metadata||
>   ||s|| <field serialized="true">|| <field name="''name''">||
> - ||efk|| <map embedded-key="true" embedded-value="true">|| <field  
> name="''name''" table="''join_table''">||
> + ||efk|| <map embedded-key="true" embedded-value="false">|| <field  
> name="''name''" table="''join_table''">||
>   ||es|| <map embedded-key="true" serialized-value="true">|| <field  
> name="''name''" table="''join_table''">||
> + ||ee|| <map embedded-key="true" embedded-value="true">|| <field  
> name="''name''" table="''join_table''">||
>
>


Mime
View raw message