Some corrections to the previous attempt (due to excessive use of the Ctrl-C-Ctrl-V design pattern) :-
> Example 1 : Collection of BigDecimal I accidentally omitted this option 3. Embedded collection <field name="myfield" embedded="true"> <collection element-type="java.math.BigInteger"/> </field> No idea what is expected here .. probably the same as "serialised" option ? Not currently implemented by JPOX. > Example 2 : Collection of PC > 2. Basic collection with FK > <field name="myfield"> > <collection element-type="MyElement"/> > </field> This creates *2* tables - 1 for the class owning "myfield", 1 for the element class (with FK back to the owner table). > 3. Embedded element > <field name="myfield"> > <collection element-type="MyElement" embedded-element="true"/> > <join/> > </field> This creates *2* tables - 1 for the class owning "myfield", and 1 join table containing the elements (columns aligned with the fields of the PC element). > 4. Embedded element (fully specified) > <field name="myfield"> > <collection element-type="MyElement" embedded-element="true"/> > <join/> > <element> > <embedded> > ... (full spec of field mappings) > </embedded> > </element> > </field> This creates *2* tables - 1 for the class owning "myfield", and 1 join table containing the (embedded) elements (columns aligned with the mappings specified in the <embedded> section above. -- Andy
