I've given a quick glance here, and I haven't seen anything that could help me with this one.
i've created a class.hbm.xml file with something like the following (sans xml header stuff):
<hibernate-mapping>
<class name="com.company.blah.BaseClass" table="the_table" discriminator-value="TheBase">
<id name="id" type="long" column="id">
<generator class="native"/>
</id>
<discriminator column="base" type="string"/>
<property name="baseName" column="baseName" type="string"/>
</class>
</hibernate-mapping>
then i created a subclass.hbm.xml file with something like the following (same sans):
<hibernate-mapping>
<subclass name="com.company.blah.SubClass" extends="com.company.blah.BaseClass" discriminator-value="TheSub">
<property name="subName" column="subName" type="string"/>
</subclass>
</hibernate-mapping>
then i use the hbm2java tool on first the class.hbm.xml then the subclass.hbm.xml. it works fine on the first one, but i get the following message on the second one:
net.sf.hibernate.MappingException: Cannot extend unmapped class com.company.blah.BaseClass
at net.sf.hibernate.tool.hbm2java.CodeGenerator.handleClass(CodeGenerator.java:147)
at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:118)
i have no idea why i'm getting this. can anybody help me?
_________________ Thank you,
Andy Sears
|