-->
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.  [ 2 posts ] 
Author Message
 Post subject: Automatically detect the *.hbm.xml files: how?
PostPosted: Wed Feb 21, 2007 5:31 am 
Newbie

Joined: Wed Feb 21, 2007 5:05 am
Posts: 1
Hello,

How do I make NHibernate detect the *.hbm.xml files automatically? This code works fine:

Code:
new Configuration().AddFile("Table.hbm.xml")


But if I don't use AddFile(), the mapping just doesn't work ("Unknown entity class" exception is thrown then). I tried to use "AddAssembly" - this didn't work. Why can that be?

All my *.hbm.xml files are included into the VS2005 project, and they are copied to the output directory.

Hibernate version:
1.0.4

Name and version of the database:
MS SQL Server 2000 SP4


[/code]


Top
 Profile  
 
 Post subject: Re: Automatically detect the *.hbm.xml files: how?
PostPosted: Wed Feb 21, 2007 8:16 am 
Newbie

Joined: Wed Sep 06, 2006 8:33 am
Posts: 19
Dmitry Perets wrote:
Hello,
All my *.hbm.xml files are included into the VS2005 project, and they are copied to the output directory.


In VS mark the *.hbm.xml files Embedded in Resource and try add assembly.


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