-->
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.  [ 2 posts ] 
Author Message
 Post subject: Association to a subclass of self gives a unmapped class err
PostPosted: Tue Nov 08, 2005 11:20 am 
Newbie

Joined: Fri Feb 20, 2004 12:15 pm
Posts: 8
Hello,

I have the following class
Code:
public class Thing {
   ...
   private SubclassOfThing subthing;
   ...
   public SubclassOfThing getSubthing();
   ...                               setSubthing();
}


Since the mapping forces me to put my <many-to-one> before the subclass declaration, I have this error when I generate my schemaexport

Code:
Schema text failed: An association from the table thing refers to an unmapped class: SubclassOfThing


<hibernate-mapping>
    <class name="Thing" table="thing" discriminator-value="0">
    <discriminator column="discriminator" type="byte"/>
    ...
    <many-to-one name="subthing" column="subthing" class="SubThing" />
    ...
    <subclass name="SubThing" discriminator-value="1">
    ...
    </subclass>
    </class>
</hibernate-mapping>



Is there any way around that problem? It reminds me of the forward keyword we used to have in Pascal.

Lacou


Hibernate version:
3.x


Top
 Profile  
 
 Post subject: FIXED it : A wrong package name will do it
PostPosted: Tue Nov 08, 2005 11:45 am 
Newbie

Joined: Fri Feb 20, 2004 12:15 pm
Posts: 8
Fixed by putting the good package name


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

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.