<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Iterator &#187; mapping</title>
	<atom:link href="http://theiterator.com/tag/mapping/feed/" rel="self" type="application/rss+xml" />
	<link>http://theiterator.com</link>
	<description>This is my blog. There are many like it, but this one is mine.</description>
	<lastBuildDate>Thu, 10 Dec 2009 06:13:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to nest NHibernate mapping files in Visual Studio projects</title>
		<link>http://theiterator.com/2009/02/how-to-nest-nhibernate-mapping-files-in-visual-studio-projects/</link>
		<comments>http://theiterator.com/2009/02/how-to-nest-nhibernate-mapping-files-in-visual-studio-projects/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 16:13:19 +0000</pubDate>
		<dc:creator>theiterator</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://theiterator.com/?p=65</guid>
		<description><![CDATA[Nesting files in Visual Studio projects is as simple as (pun intended) opening your project file into a text editor, finding your reference to a project file and adding &#60;DependentUpon&#62;Class.cs&#60;/DependentUpon&#62; within the element.
However, there&#8217;s a catch. Nesting the files causes the file names to be overwritten. In this case, the .hbm.xml suffix gets dropped. That [...]]]></description>
			<content:encoded><![CDATA[<p>Nesting files in Visual Studio projects is as simple as (pun intended) opening your project file into a text editor, finding your reference to a project file and adding &lt;DependentUpon&gt;Class.cs&lt;/DependentUpon&gt; within the element.</p>
<p>However, there&#8217;s a catch. Nesting the files causes the file names to be overwritten. In this case, the .hbm.xml suffix gets dropped. That effectively prevents Configuration.AddAssembly() from finding the mapping information. A way around this pitfall is defining the dependency as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;EmbeddedResource</span> <span style="color: #000066;">include</span>=<span style="color: #ff0000;">&quot;ServiceRequest.hbm.xml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DependentUpon<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ServiceRequest.cs<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DependentUpon<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LogicalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ServiceRequest.hbm.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LogicalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/EmbeddedResource<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Thanks go to Sami for cracking this nut with me.</p>
<p class="bookmark-me"><a title="technorati.com" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftheiterator.com%2F2009%2F02%2Fhow-to-nest-nhibernate-mapping-files-in-visual-studio-projects%2F"><img src="http://theiterator.com/wp-content/plugins/bookmark-me/images/technorati.png" style="margin:0;border:0;padding:0" alt="bookmark"/></a> <a title="del.icio.us" href="http://del.icio.us/post?url=http%3A%2F%2Ftheiterator.com%2F2009%2F02%2Fhow-to-nest-nhibernate-mapping-files-in-visual-studio-projects%2F&amp;title=How+to+nest+NHibernate+mapping+files+in+Visual+Studio+projects"><img src="http://theiterator.com/wp-content/plugins/bookmark-me/images/delicious.png" style="margin:0;border:0;padding:0" alt="bookmark"/></a> <a title="stumbleupon.com" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftheiterator.com%2F2009%2F02%2Fhow-to-nest-nhibernate-mapping-files-in-visual-studio-projects%2F&amp;title=How+to+nest+NHibernate+mapping+files+in+Visual+Studio+projects"><img src="http://theiterator.com/wp-content/plugins/bookmark-me/images/stumbleupon.png" style="margin:0;border:0;padding:0" alt="bookmark"/></a> <a title="digg.com" href="http://digg.com/submit?url=http%3A%2F%2Ftheiterator.com%2F2009%2F02%2Fhow-to-nest-nhibernate-mapping-files-in-visual-studio-projects%2F&amp;title=How+to+nest+NHibernate+mapping+files+in+Visual+Studio+projects"><img src="http://theiterator.com/wp-content/plugins/bookmark-me/images/digg.png" style="margin:0;border:0;padding:0" alt="bookmark"/></a> <a title="www.facebook.com" href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftheiterator.com%2F2009%2F02%2Fhow-to-nest-nhibernate-mapping-files-in-visual-studio-projects%2F&amp;t=How+to+nest+NHibernate+mapping+files+in+Visual+Studio+projects"><img src="http://theiterator.com/wp-content/plugins/bookmark-me/images/facebook.png" style="margin:0;border:0;padding:0" alt="bookmark"/></a> <a title="reddit.com" href="http://reddit.com/submit?url=http%3A%2F%2Ftheiterator.com%2F2009%2F02%2Fhow-to-nest-nhibernate-mapping-files-in-visual-studio-projects%2F&amp;title=How+to+nest+NHibernate+mapping+files+in+Visual+Studio+projects"><img src="http://theiterator.com/wp-content/plugins/bookmark-me/images/reddit.png" style="margin:0;border:0;padding:0" alt="bookmark"/></a> <a title="twitthis.com" href="http://twitthis.com/twit?url=http%3A%2F%2Ftheiterator.com%2F2009%2F02%2Fhow-to-nest-nhibernate-mapping-files-in-visual-studio-projects%2F&amp;title=How+to+nest+NHibernate+mapping+files+in+Visual+Studio+projects"><img src="http://theiterator.com/wp-content/plugins/bookmark-me/images/twitter.png" style="margin:0;border:0;padding:0" alt="bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://theiterator.com/2009/02/how-to-nest-nhibernate-mapping-files-in-visual-studio-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
