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.