-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hbm2java subclass extends MappingException
PostPosted: Fri Jul 16, 2004 4:03 pm 
Newbie

Joined: Fri Jul 16, 2004 3:32 pm
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.