tenwit wrote:
abstract="true" does not affect DDL: if it did, table-per-class-hierarchy mixed with table-per-subclass wouldn't work. If the abstract superclass genuinely has no dedicated table, then don't give it a table="tablename" attrbiute. That'll prevent DDL generation for it.
Thx for your quick response. There is no "table" tag on the abstract class. Please note the first mapping file below does NOT have that tag. Only the joined-subclass mapping file that "extend" the abstract joined-subclass does.
<!-- code from abstract mapping file -->
<joined-subclass
name="AbstractRepositoryFeature"
extends="RepositoryObject"
abstract="true">
<key column="ID" />
<property
name="index"
column="NDX"
type="integer"
not-null="true">
</property>
<property
name="lowerBound"
column="LOWER_BOUND"
type="integer"
not-null="false">
</property>
<property
name="upperBound"
column="UPPER_BOUND"
type="integer"
not-null="false">
</property>
<many-to-one
name="datatype"
class="RepositoryObject"
column="DATATYPE_ID">
</many-to-one>
</joined-subclass>
<!-- code from concrete class mapping file -->
<joined-subclass
table="MMR_REFS"
extends="AbstractRepositoryFeature"
name="RepositoryReference">
<key column="ID" />
<property
name="containment"
column="IS_CONTAINMENT"
type="boolean"
not-null="false">
</property>
<many-to-one
name="opposite"
class="RepositoryObject"
foreign-key="OPPOSITE_ID">
</many-to-one>
</joined-subclass>