|
From: Gavin K. <ga...@ap...> - 2002-10-11 05:10:21
|
> > * SchemaExport support (and proper support in the mapping document)
>
> 80% done
100% done
Theres another thing to do that I left off the list earlier. Currently the
mutli-table persistence still uses a discriminator column to decide which
subclass the instance belongs to. The proper way to do this is to check
which tables have a null primary key (in the outerjoined resultset). This
will be slightly complicated to implement but I'll try to knock it over in
the next couple of days.
It would be cool if people could check out this new stuff and go looking for
bugs. A multitable mapping looks like:
<class name="cirrus.hibernate.test.Simple" table="rootclass">
<id type="long" column="id_" >
<generator class="assigned"/>
</id>
<discriminator column="clazz"/>
<version name="count"/>
<property name="name"/>
<property name="address"/>
<property name="date" column="date_"/>
<joined-subclass name="cirrus.hibernate.test.LessSimple"
table="subclass">
<superclass-key column="id_"/>
<property name="intprop"/>
<one-to-one name="other" class="cirrus.hibernate.test.LessSimple"/>
<property name="foo" column="other"/>
</joined-subclass>
<joined-subclass name="cirrus.hibernate.test.Multi"
table="nuthasubclass">
<superclass-key column="sid"/>
<property name="extraProp"/>
<many-to-one name="other" class="cirrus.hibernate.test.Multi"/>
<joined-subclass name="cirrus.hibernate.test.SubMulti"
table="submulti">
<superclass-key column="sid"/>
<property name="amount"/>
</joined-subclass>
</joined-subclass>
</class>
|