Hi Robert,

It seems you are confusing the "super" mapping strategy (which is used
to map a class across multiple joined tables) with the extent concept
(which is used to designate a "search domain" for querying.  Mapping a
class as an extent does *not* make the extent class to inherit the
field, reference and collection descriptors of the "super" class.

If you look at your descriptor for student, OJB is doing exactly what
you tell it to do; save to attributes (id, ojbConcreteClass) to the
AbstractPerson table.  If you wish to also put an entry in the
AbstractEntity table, you will need to add a reference descriptor to
this class descriptor such as follows:

<!-- nz.ac.auckland.markit.core.Student -->
class-descriptor 
        class="nz.ac.auckland.markit.core.Student" 
        table="AbstractPerson">
        <field-descriptor 
                name="id" 
                column="id" 
                jdbc-type="INTEGER" 
                primarykey="true" 
                autoincrement="true"/>
        <field-descriptor 
                name="ojbConcreteClass" 
                column="class_name" 
                jdbc-type="VARCHAR"/>
      <reference-descriptor 
                name="super" 
                class-ref="nz.ac.auckland.markit.core.AbstractEntity">
            <foreignkey field-ref="id"/>
      </reference-descriptor>
</class-descriptor>

For the Group exception, check to make sure that group has a public,
zero argument constructor defined.  Also, it appears that you have the
order of your field descriptor and reference descriptor backwards
according to the DTD.  repository.xml should not pass DTD validation
with it defined like this.

<!-- nz.ac.auckland.markit.core.Group -->
<class-descriptor 
        class="nz.ac.auckland.markit.core.Group" 
        table="PaperGroup">
      <field-descriptor 
                name="id" 
                column="id" 
                jdbc-type="INTEGER" 
                primarykey="true" 
                autoincrement="true"/>
      <reference-descriptor 
                name="super" 
                class-ref="nz.ac.auckland.markit.core.AbstractEntity">
            <foreignkey field-ref="id"/>
      </reference-descriptor>
</class-descriptor>

Hope this helps,

Wally Gelhar
UW - Eau Claire
Facilities Planning & Management


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to