-->
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: Namespace problem
PostPosted: Tue Oct 25, 2005 5:18 pm 
Hi! im developing with VS2003 ide and MS SQL server 2000, i have a solution with 2 projects, the first one for the Business Layer who have classes and the .hbm.xml files that access to the data by NHibernate, and the another one a simple winform project that try access to the firs one.

The problem is that my Business project (idem namespace) have Business.Alpha, Business.Beta and Business.Gama subNamespaces and such sub-namespaces in Business are not reacheable by the NHibernate (referenced in both projects)

my code is like this:

nhConfig = new Configuration();
nhConfig.AddAssembly("Business");
nhFactory = nhConfig.BuildSessionFactory();

where Business is the Business.dll generated by my first project, if i use
nhConfig.AddAssembly("Business.Alpha"); NHibernate dont find the .dll

in each hbm.xml file i put the correct subNamaspace for the class but neither works

im doing some bad?
all the classes for NHibernate must be in the base namespace?

Antares


Top
  
 
 Post subject:
PostPosted: Tue Oct 25, 2005 6:04 pm 
Newbie

Joined: Sun Sep 25, 2005 9:11 am
Posts: 13
Location: Bergen, Norway
ISessionFactory.AddAssembly() loads an assembly, not a namespace.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 26, 2005 10:12 am 
Hello thanks for response, finally i found the problem! im very new to NHibernate (3 days) and of couse i have not all concepts clearly stablished.
my first mistake was not put the correct values in the .hbm.xml config files!
in the class element, the first parameter in name is the fully qualified name (including all namespaces) and the other is the name of the assembly
like this:
<class name="Business.locacion.Provincia,Business" table="Provincia">

And finally not ReBuild the project for this changes!! :oops:

now it


Top
  
 
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.