-->
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.  [ 3 posts ] 
Author Message
 Post subject: Is class declaration order important?
PostPosted: Wed Jun 22, 2005 6:11 am 
Newbie

Joined: Wed Jun 22, 2005 6:02 am
Posts: 2
Hello,

I have HBM mapping like that:

Code:
<class name="A">
...
<many-to-one name="BList" class="B" column="ref_A" />
</class>
<class name="B">
...
<class>


When I load configuration
Code:
Configuration cfg = new Configuration();
cfg.AddAssembly("MyAssembly");

I have the permanent error
"MappingException: could not find class: B"

Do I must always declare class B before A?
What about self-referensing (I get the same error)?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 22, 2005 8:37 am 
Newbie

Joined: Wed Jun 22, 2005 6:02 am
Posts: 2
More precise.
I found this error occurred only when specifying namespace and assembly in <class> element.
When using global values of <hibernate-mapping> element no error produced.
It may be a bug, I don't know.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 23, 2005 8:11 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
The order doesn't matter; and "when specifying namespace and assembly in <class> element", you must also do it for "<many-to-one name="BList" class="B" column="ref_A" />"

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


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