-->
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: Store hbm file in subdirectory
PostPosted: Sun Mar 16, 2008 12:09 pm 
Newbie

Joined: Sat Mar 15, 2008 11:12 am
Posts: 4
Hi,


I've build a small project in VS2005 using NHibernate and would like to store the hbm files in a subdirectory like this:

root
|
---Classes
|
---Mapping


What do I need to configure to make this work?

I've already tried the search since I thought that this would be a common question but I couldn't find anything.


Regards,
DarnDao


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 16, 2008 12:33 pm 
Regular
Regular

Joined: Wed Jan 25, 2006 1:11 am
Posts: 118
Location: Copenhagen, Denmark
If you mark your mapping files as embedded ressources and use AddAssembly on the Configuration object it should work, it searches for all files ending with hbm.xml embedded in the assembly


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 16, 2008 4:11 pm 
Newbie

Joined: Sat Mar 15, 2008 11:12 am
Posts: 4
Thanks that worked. Is it also possible to specify this in app/web.config?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 16, 2008 4:34 pm 
Regular
Regular

Joined: Wed Jan 25, 2006 1:11 am
Posts: 118
Location: Copenhagen, Denmark
Yes, you can specify the "mappingAssembly" in the nHibernate configuration.


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.