-->
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.  [ 5 posts ] 
Author Message
 Post subject: net.sf.hibernate.MappingException: An association from the
PostPosted: Wed Sep 24, 2003 3:09 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi,

It

_________________
Tads


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 24, 2003 3:48 pm 
Beginner
Beginner

Joined: Wed Sep 10, 2003 5:34 pm
Posts: 36
Location: New York, NY
Sounds like you aren't telling hibernate that you have a mapping file for Departments. Are you using the hibernate.cfg.xml style of configuration? If so, make sure that your Department mapping file is referenced in there along with the User mapping.

Matt


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 24, 2003 4:04 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi Matt, how are you?


So, Where do I view the hibernate.cfg.xml style of configuration ?

It follows below the User mapping.

Code:
<hibernate-mapping>
    <class name="br.com.proj.dao.register.User" table="users">
        <property name="dtExclusion" column="dt_exclusion"/>
        <property name="dtInclusion" column="dt_inclusion"/>
      <id name="idUser" column="id_user">
         <generator class="assigned"/>
      </id>
        <property name="name" column="name"/>
        <property name="password" column="password"/>
        <property name="stUser" column="st_user"/>
      <property name="nbEmployee" column="nb_employee"/>
        <many-to-one name="department" column="id_department" class="br.com.proj.dao.register.Department"/>
        <many-to-one name="parentUser" column="id_parent_user"/>
        <many-to-one name="template" column="id_template"/>
    </class>

</hibernate-mapping>


I don

_________________
Tads


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 24, 2003 4:13 pm 
Beginner
Beginner

Joined: Wed Sep 10, 2003 5:34 pm
Posts: 36
Location: New York, NY
Hey,

I guess it all depends on how you're configuring your system. I'd take a look at http://www.hibernate.org/hib_docs/refer ... ation.html to see what's best for you, I use http://www.hibernate.org/hib_docs/refer ... uration-s6 style of configuration.

Whatever way you end up configuring things you're not adding the Department mapping to that config.

Matt


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 25, 2003 7:19 am 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi,

Well, I analyzed the sites that you passed me.

I

_________________
Tads


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.