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.  [ 4 posts ] 
Author Message
 Post subject: Bi-directional association
PostPosted: Fri Oct 31, 2008 1:23 pm 
Newbie

Joined: Tue Oct 28, 2008 3:12 pm
Posts: 6
Implementing one-to-many bidirectional association.
I have wrote two mapping files, first have:
Code:
<class name="HelloNHibernate.Domains.Associations.OneToMany.B,
         HelloNHibernate" lazy ="false" table="OMTableB">
    ...
   <set name="As" inverse="true">
      <key column="IDinB"/>
      <one-to-many class="A"/>
    </set>
  </class>

Second have:
Code:
<class name="HelloNHibernate.Domains.Associations.OneToMany.A,
         HelloNHibernate" lazy ="false" table="OMTableA">
...    <many-to-one name="Parent" column="IDinB" class="B"/>
  </class>

After being compiled, NHibernate says that he couldn`t find class="A" in first mapping file. I suspect that this is because on this step, he haven`t compiled second mapping file. What should I do?

Exception is : {"Could not load type A. Possible cause: no assembly name specified.":""}, "associated class not found: A"


Last edited by archeg on Sat Nov 01, 2008 9:33 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 01, 2008 6:02 am 
Beginner
Beginner

Joined: Sun Oct 22, 2006 12:06 pm
Posts: 39
I suspect that your another xml is not marked as embeded resouce


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 01, 2008 9:16 am 
Newbie

Joined: Tue Oct 28, 2008 3:12 pm
Posts: 6
pyhavaim wrote:
I suspect that your another xml is not marked as embeded resouce

nope. I even tried to combine all two of my <class> tags in one file. Nothing helps (

_________________
Could u tell me, when I have mistakes in English plz? :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 01, 2008 10:05 am 
Newbie

Joined: Tue Oct 28, 2008 3:12 pm
Posts: 6
Problem resolved, tnx. Wrote full qualified name (instead of just class name) - all works

_________________
Could u tell me, when I have mistakes in English plz? :)


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