Differences between revisions 7 and 8
Revision 7 as of 2004-09-26 08:21:16
Size: 1421
Comment:
Revision 8 as of 2004-09-26 08:26:05
Size: 1449
Comment:
Deletions are marked like this. Additions are marked like this.
Line 32: Line 32:
Another problem is the mapping on-class-multiple-tables, that is currently implemented using the 'super'-reference-descriptor.  Another problem is the mapping on-class-multiple-tables, that is currently implemented using the 'super'-reference-descriptor (see OneClassMultipleTables).

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).

FrontPage


JakobBraeuchi

MixingMappingStrategies (last edited 2009-09-20 22:56:15 by localhost)