|
Size: 1449
Comment:
|
← Revision 9 as of 2009-09-20 22:56:15 ⇥
Size: 1449
Comment: converted to 1.6 markup
|
| No differences found! | |
OJB should support full flexibilty in choosing the mapping strategy within an extent hierarchy. There is a problem report in scarab:
http://nagoya.apache.org/scarab/issues/id/OJB179
The mapping strategy within a class hierarchy should be more flexible. OJB 1.0 does not allow mixing one-class-one-table with many-classes-one-table, because 'ojbConcreteClass?' is evaluated statically.
OJB 1.1 will fix this issue, fixes are already in CVS. For the many-classes-one-table mapping the discriminator-column (old ojbConcreteClass?) can be defined in a special discriminator-descriptor. The optional attribute value can be used to set a user defined value to discriminate the classes. If 'value' is omitted, it defaults to the name of tha class from class-descriptor.
<class-descriptor
class="org.apache.ojb.broker.MultipleTableExtentAwareQueryTest?$ExtentA?"
table="EXTENT_TEST_A"
>
<discriminator-descriptor
column="class_name"
jdbc-type="VARCHAR"
value="MTEA_Ext_A"
/>
<field-descriptor
name="objId"
column="OBJ_ID"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
/>
</class-descriptor>Another problem is the mapping on-class-multiple-tables, that is currently implemented using the 'super'-reference-descriptor (see OneClassMultipleTables).