You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by oj...@db.apache.org on 2004/09/26 10:04:00 UTC
[DB OJB Wiki] Updated: MixingMappingStrategies
Date: 2004-09-26T01:04:00
Editor: JakobBraeuchi <jb...@gmx.ch>
Wiki: DB OJB Wiki
Page: MixingMappingStrategies
URL: http://wiki.apache.org/db-ojb/MixingMappingStrategies
no comment
Change Log:
------------------------------------------------------------------------------
@@ -2,3 +2,29 @@
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org