<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Maintain integrity in NHibernate bidirectional association</title>
	<atom:link href="http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/</link>
	<description>Wrecks of code floating in the sea of Internet By Ricci Gian Maria</description>
	<lastBuildDate>Thu, 09 Feb 2012 16:15:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Berryl Hesh</title>
		<link>http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/comment-page-1/#comment-2570</link>
		<dc:creator>Berryl Hesh</dc:creator>
		<pubDate>Fri, 10 Jul 2009 01:39:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/#comment-2570</guid>
		<description>Yes, you can keep the mapping in a different assembly and use FNH to get it done. Instead of mapping to the internal property, map to the public one even though it is an IEnumerable. The specify the access to the field, ie
            mapping.HasMany(x =&gt; x.Staff) // the public property
                .AsSet()
                // private field, in my case _staff
                .Access.AsLowerCaseField(Prefix.Underscore)
                .Inverse()
                .Cascade.SaveUpdate();

The is still an internal _InternalStaff supporting the bidirectional integrity, but your mapping needn&#039;t care.

Thanks for pointing out this could be done alkampfer :-)</description>
		<content:encoded><![CDATA[<p>Yes, you can keep the mapping in a different assembly and use FNH to get it done. Instead of mapping to the internal property, map to the public one even though it is an IEnumerable. The specify the access to the field, ie<br />
            mapping.HasMany(x =&gt; x.Staff) // the public property<br />
                .AsSet()<br />
                // private field, in my case _staff<br />
                .Access.AsLowerCaseField(Prefix.Underscore)<br />
                .Inverse()<br />
                .Cascade.SaveUpdate();</p>
<p>The is still an internal _InternalStaff supporting the bidirectional integrity, but your mapping needn&#8217;t care.</p>
<p>Thanks for pointing out this could be done alkampfer <img src='http://www.codewrecks.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Berryl Hesh</title>
		<link>http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/comment-page-1/#comment-2569</link>
		<dc:creator>Berryl Hesh</dc:creator>
		<pubDate>Fri, 10 Jul 2009 00:18:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/#comment-2569</guid>
		<description>I was thinking Fluent NHibernate. I&#039;d like to use this mapping pattern too, and keep my mappings in a different assembly from the domain, but it cannot see the internal ISet from there to map it.</description>
		<content:encoded><![CDATA[<p>I was thinking Fluent NHibernate. I&#8217;d like to use this mapping pattern too, and keep my mappings in a different assembly from the domain, but it cannot see the internal ISet from there to map it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alkampfer</title>
		<link>http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/comment-page-1/#comment-2553</link>
		<dc:creator>alkampfer</dc:creator>
		<pubDate>Thu, 02 Jul 2009 06:43:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/#comment-2553</guid>
		<description>THis is not true ;), nhibernate uses reflection and can map even private members, location of the mappings is not important, and sure, I prefer keeping mappings outside the assembly that contains my entities.

alk.</description>
		<content:encoded><![CDATA[<p>THis is not true <img src='http://www.codewrecks.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> , nhibernate uses reflection and can map even private members, location of the mappings is not important, and sure, I prefer keeping mappings outside the assembly that contains my entities.</p>
<p>alk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Berryl Hesh</title>
		<link>http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/comment-page-1/#comment-2551</link>
		<dc:creator>Berryl Hesh</dc:creator>
		<pubDate>Wed, 01 Jul 2009 15:36:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/#comment-2551</guid>
		<description>Mapping to the internal property demands that you keep your mappings in the same assembly as your domain, which is a topic I&#039;ve seen debated.

Nice posting.

Cheers,
Berryl</description>
		<content:encoded><![CDATA[<p>Mapping to the internal property demands that you keep your mappings in the same assembly as your domain, which is a topic I&#8217;ve seen debated.</p>
<p>Nice posting.</p>
<p>Cheers,<br />
Berryl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PlasmaSoft</title>
		<link>http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/comment-page-1/#comment-2477</link>
		<dc:creator>PlasmaSoft</dc:creator>
		<pubDate>Mon, 25 May 2009 12:04:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/#comment-2477</guid>
		<description>Does someone have used this pattern in a real projet. It looks very smart but i can&#039;t see the limits ...</description>
		<content:encoded><![CDATA[<p>Does someone have used this pattern in a real projet. It looks very smart but i can&#8217;t see the limits &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arjan`s World &#187; LINKBLOG for May 6, 2009</title>
		<link>http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/comment-page-1/#comment-2385</link>
		<dc:creator>Arjan`s World &#187; LINKBLOG for May 6, 2009</dc:creator>
		<pubDate>Wed, 06 May 2009 14:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2009/05/05/maintain-integrity-in-nhibernate-bidirectional-association/#comment-2385</guid>
		<description>[...] Maintain integrity in NHibernate bidirectional association - Alkampfer [...]</description>
		<content:encoded><![CDATA[<p>[...] Maintain integrity in NHibernate bidirectional association &#8211; Alkampfer [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

