-->
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: An association from the table X refers to an unmapped class
PostPosted: Thu Mar 10, 2005 7:09 pm 
Newbie

Joined: Thu Jan 13, 2005 3:46 pm
Posts: 3
Hibernate version: 2.1.7

Mapping documents:
Code:
<hibernate-mapping>
   <class name="myProj.SupplierLine" table="SUP_LINE">
      <id name="id">
         <generator class="native"/>
      </id>
        <property name="cost" type="double"/>
        <many-to-one name="supplier" class="myProj.legacy.Supplier"/>
   </class>


<hibernate-mapping package="myProj.legacy">
   <class name="Supplier" table="SUPPLIER_DIM">
        <id name="code" column="SUP_CODE" type="string" length="25">
            <generator class="assigned"/>
        </id>
      <property name="name" column="SUP_NAME" type="string" length="200" not-null="true"/>
      <property name="state" column="SUP_ACTIVEIND" type="string" length="10" not-null="true"/>
   </class>
</hibernate-mapping>

</hibernate-mapping>



Error Message when running hbm2ddl:

Quote:
Schema text failed: An association from the table SUP_LINE refers to an unmapped class: myProj.legacy.Supplier



How can I successfully generate the schema for SupplierLine without creating the schema for Supplier? I do have a Supplier.hbm.xml, but if I add this to my list of mapping files when I call hbm2ddl, then this will drop the legacy SUPPLIER table. I don't want that to happen.

Any help is greatly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 9:18 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not possible at the moment.

patches / feature requests go to the jira.

/max

_________________
Max
Don't forget to rate


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.