-->
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: Newbie - Configuration cfg = new Configuration().AddAssem...
PostPosted: Tue Jul 24, 2007 11:17 am 
Newbie

Joined: Tue Jul 24, 2007 10:58 am
Posts: 1
Newbie Question:

More of a Visual Studio question than hibernate but related. I'm going through the example in Chapter 3 of the docs.

Configuration cfg = new Configuration().AddAssembly( "NHibernate.Auction" );

If a tool like Visual Studio .NET or NAnt is used to build the assembly, then make sure that the .hbm.xml files are compiled into the assembly as Embedded Resources.

How do I add my .hbm.xml files as embedded resources? Where do I put my .hbm.xml files. This is a Visual C# console application.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 11:40 am 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
Where one puts the mapping files (hbm.xml files) is mostly a preference thing. I personally like to put it with my data access project ("project" in Visual Studio's sense); I won't bore you with my rationale and stuff. You can put them in which ever project you choose.

To embed the mapping file, go to the Solution Explorer, for each hbm.xml files, highlight it and press F4, then in the "Properties" window, change the "Build Action" property from "Content" to "Embedded Resource".

_________________
Karl Chu


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.