<?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: NHibernate Mapping Examples</title>
	<atom:link href="http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/feed/" rel="self" type="application/rss+xml" />
	<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/</link>
	<description>Trying to walk that thin line between intelligence and ignorance</description>
	<lastBuildDate>Thu, 11 Mar 2010 23:14:12 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Salman</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-23249</link>
		<dc:creator>Salman</dc:creator>
		<pubDate>Wed, 16 Dec 2009 19:18:06 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-23249</guid>
		<description>ah ok, you only have the Territory entity that is able to add/remove employees, so its not bidirectional in that manner :)</description>
		<content:encoded><![CDATA[<p>ah ok, you only have the Territory entity that is able to add/remove employees, so its not bidirectional in that manner <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Salman</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-23248</link>
		<dc:creator>Salman</dc:creator>
		<pubDate>Wed, 16 Dec 2009 19:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-23248</guid>
		<description>Davy,

In your example, you have a many-to-many relationship for territories and employees.
You used a Set in the Territory mapping file, and a bag in the employee mapping file.

Don&#039;t you need to set one of them with the inverse=true attribute?  To tell nhibernate which entity collection to use when their is a change?</description>
		<content:encoded><![CDATA[<p>Davy,</p>
<p>In your example, you have a many-to-many relationship for territories and employees.<br />
You used a Set in the Territory mapping file, and a bag in the employee mapping file.</p>
<p>Don&#8217;t you need to set one of them with the inverse=true attribute?  To tell nhibernate which entity collection to use when their is a change?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-23074</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Wed, 02 Dec 2009 07:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-23074</guid>
		<description>@Salman

nope, i don&#039;t really believe in them :)</description>
		<content:encoded><![CDATA[<p>@Salman</p>
<p>nope, i don&#8217;t really believe in them <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Salman</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-23073</link>
		<dc:creator>Salman</dc:creator>
		<pubDate>Tue, 01 Dec 2009 18:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-23073</guid>
		<description>Great example!

Curious, did you use any tools for generating your mappings?</description>
		<content:encoded><![CDATA[<p>Great example!</p>
<p>Curious, did you use any tools for generating your mappings?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ibrahim</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-22711</link>
		<dc:creator>Ibrahim</dc:creator>
		<pubDate>Wed, 14 Oct 2009 17:56:19 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-22711</guid>
		<description>Hi..

I am new to NHIbernate.
Can anybody tellme how to do mapping / solve the current situation..

Product Table                  Category Table

productid                      categoryId
productname                    category
productdescription
category{string type}

Current Window: Product.Xaml [iam binding product entity to this form/window]

and my requirement is while accessing product entity from product table i need to access all categories from category table.So that it will be binded to a dropdownlist. is it possible? or i need to bind categories programmatically after loaded product entity ?</description>
		<content:encoded><![CDATA[<p>Hi..</p>
<p>I am new to NHIbernate.<br />
Can anybody tellme how to do mapping / solve the current situation..</p>
<p>Product Table                  Category Table</p>
<p>productid                      categoryId<br />
productname                    category<br />
productdescription<br />
category{string type}</p>
<p>Current Window: Product.Xaml [iam binding product entity to this form/window]</p>
<p>and my requirement is while accessing product entity from product table i need to access all categories from category table.So that it will be binded to a dropdownlist. is it possible? or i need to bind categories programmatically after loaded product entity ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RichB</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-10898</link>
		<dc:creator>RichB</dc:creator>
		<pubDate>Tue, 31 Mar 2009 15:41:20 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-10898</guid>
		<description>Beautiful. 
My only complaint is that it could have done with some complex HQL examples.

&quot;from Employees e where e.Orders.OrderLines.Discount &gt; 5&quot;

...and I know that won&#039;t compile, because that demonstrates what I&#039;m stuck trying to do. I was hoping your fantastic Northwind solution which give me the answer.</description>
		<content:encoded><![CDATA[<p>Beautiful.<br />
My only complaint is that it could have done with some complex HQL examples.</p>
<p>&#8220;from Employees e where e.Orders.OrderLines.Discount &gt; 5&#8243;</p>
<p>&#8230;and I know that won&#8217;t compile, because that demonstrates what I&#8217;m stuck trying to do. I was hoping your fantastic Northwind solution which give me the answer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Inquisitive Coder - Davy Brion&#8217;s Blog &#187; Blog Archive &#187; What Would You Like To See In My Upcoming NHibernate Examples?</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-10272</link>
		<dc:creator>The Inquisitive Coder - Davy Brion&#8217;s Blog &#187; Blog Archive &#187; What Would You Like To See In My Upcoming NHibernate Examples?</dc:creator>
		<pubDate>Sun, 22 Mar 2009 15:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-10272</guid>
		<description>[...] original version of my NHibernate Mapping Examples was pretty popular, but they were based on NHibernate 1.2 and only showed some of the basics. I [...]</description>
		<content:encoded><![CDATA[<p>[...] original version of my NHibernate Mapping Examples was pretty popular, but they were based on NHibernate 1.2 and only showed some of the basics. I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Albert Araalie</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-7522</link>
		<dc:creator>Albert Araalie</dc:creator>
		<pubDate>Sat, 10 Jan 2009 10:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-7522</guid>
		<description>I&#039;ve used the samples successfully! Thanks alot! How would I map a view that queries the Employees&#039; table, through to the Products&#039; table? An initial complaint from nhibernate is that it cannot find an id field.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve used the samples successfully! Thanks alot! How would I map a view that queries the Employees&#8217; table, through to the Products&#8217; table? An initial complaint from nhibernate is that it cannot find an id field.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-4315</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Mon, 27 Oct 2008 17:25:28 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-4315</guid>
		<description>Well.. that didn&#039;t work... (no xml posting... duhh). (why is there no preview?)
Without the xml, it&#039;s:

class name=&quot;Table1Class&quot; table=&quot;Table1&quot;
  set name=&quot;Table3s&quot; cascade=&quot;save-update&quot; table=&quot;Table3&quot;
    key column=&quot;Table1ID&quot; 
      composite-element class=&quot;Table3Class&quot;
        property name=&quot;SortOrder&quot;
        many-to-one name=&quot;Table2Class&quot; column=&quot;Table2ID&quot;
      /composite-element
    /set
/class</description>
		<content:encoded><![CDATA[<p>Well.. that didn&#8217;t work&#8230; (no xml posting&#8230; duhh). (why is there no preview?)<br />
Without the xml, it&#8217;s:</p>
<p>class name=&#8221;Table1Class&#8221; table=&#8221;Table1&#8243;<br />
  set name=&#8221;Table3s&#8221; cascade=&#8221;save-update&#8221; table=&#8221;Table3&#8243;<br />
    key column=&#8221;Table1ID&#8221;<br />
      composite-element class=&#8221;Table3Class&#8221;<br />
        property name=&#8221;SortOrder&#8221;<br />
        many-to-one name=&#8221;Table2Class&#8221; column=&#8221;Table2ID&#8221;<br />
      /composite-element<br />
    /set<br />
/class</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-4314</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Mon, 27 Oct 2008 17:22:39 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-4314</guid>
		<description>JBurrow, probably too late of an answer, but I had to tackle the same thing (a many-to-many with an additional value).  You just need to define the association table in one of the containing classes.  For your example:

    
      
      
        
        
      
    
</description>
		<content:encoded><![CDATA[<p>JBurrow, probably too late of an answer, but I had to tackle the same thing (a many-to-many with an additional value).  You just need to define the association table in one of the containing classes.  For your example:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-1813</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sat, 06 Sep 2008 09:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-1813</guid>
		<description>I don&#039;t think you can do that... A true many-to-many only has two keys... once another column is added, it&#039;s considered an own entity in its own right. In this case it might seem a bit drastic because of the column only contains a SortOrder, but i&#039;m affraid you won&#039;t be able to use a many-to-many association for that

I can be wrong though :)</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think you can do that&#8230; A true many-to-many only has two keys&#8230; once another column is added, it&#8217;s considered an own entity in its own right. In this case it might seem a bit drastic because of the column only contains a SortOrder, but i&#8217;m affraid you won&#8217;t be able to use a many-to-many association for that</p>
<p>I can be wrong though <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jburrow</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-1799</link>
		<dc:creator>jburrow</dc:creator>
		<pubDate>Fri, 05 Sep 2008 22:49:02 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-1799</guid>
		<description>Firstly, Greate post. Very useful.

I have a question i can google the answer! So i am hoping you may know.

I have a classic many-to-many situation in my database.

Table1(id&#124;...) === Table3([id&#124;table1.id&#124;table2.id&#124;sortOrder])=== Table2(id&#124;...)

I have mapped this to my classes and this is working fine with each entity containing a collection of the other one.

however i have a column on my join table3 (sort order). And i dont know how to get hibernate to map this onto either entity.

Suggestion would be welcome. I hope i have explained the situation clearly enough.</description>
		<content:encoded><![CDATA[<p>Firstly, Greate post. Very useful.</p>
<p>I have a question i can google the answer! So i am hoping you may know.</p>
<p>I have a classic many-to-many situation in my database.</p>
<p>Table1(id|&#8230;) === Table3([id|table1.id|table2.id|sortOrder])=== Table2(id|&#8230;)</p>
<p>I have mapped this to my classes and this is working fine with each entity containing a collection of the other one.</p>
<p>however i have a column on my join table3 (sort order). And i dont know how to get hibernate to map this onto either entity.</p>
<p>Suggestion would be welcome. I hope i have explained the situation clearly enough.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kalyan</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-1680</link>
		<dc:creator>Kalyan</dc:creator>
		<pubDate>Wed, 03 Sep 2008 16:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-1680</guid>
		<description>Very nice work, very helpful.</description>
		<content:encoded><![CDATA[<p>Very nice work, very helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NHibernate Mapping Examples - NHibernate blog - NH Forge</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-1537</link>
		<dc:creator>NHibernate Mapping Examples - NHibernate blog - NH Forge</dc:creator>
		<pubDate>Sun, 31 Aug 2008 15:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-1537</guid>
		<description>[...] Note: this post was originally posted on July 15, 2007 [...]</description>
		<content:encoded><![CDATA[<p>[...] Note: this post was originally posted on July 15, 2007 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Hanselman's Computer Zen - Learn How to use NHibernate with the Summer of NHibernate Screencast Series</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-838</link>
		<dc:creator>Scott Hanselman's Computer Zen - Learn How to use NHibernate with the Summer of NHibernate Screencast Series</dc:creator>
		<pubDate>Tue, 22 Jul 2008 18:04:39 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-838</guid>
		<description>[...] I used NHibernate as my Data Layer recently when I got ASP.NET MVC running under .NET 2.0 using NHibernate examples from Davy Brion (who has an NHibernate Category on his [...]</description>
		<content:encoded><![CDATA[<p>[...] I used NHibernate as my Data Layer recently when I got ASP.NET MVC running under .NET 2.0 using NHibernate examples from Davy Brion (who has an NHibernate Category on his [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Hanselman's Computer Zen - Deploying ASP.NET MVC on ASP.NET 2.0</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-581</link>
		<dc:creator>Scott Hanselman's Computer Zen - Deploying ASP.NET MVC on ASP.NET 2.0</dc:creator>
		<pubDate>Tue, 08 Jul 2008 19:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-581</guid>
		<description>[...] or Entity Framework or anything. You&#039;ll need to use something else. In my example code I&#039;m using Davy Brion&#039;s NHibernate Northwind Sample as it&#039;s a .NET 2.0 compiled solution and it&#039;ll be acting as my [...]</description>
		<content:encoded><![CDATA[<p>[...] or Entity Framework or anything. You&#8217;ll need to use something else. In my example code I&#8217;m using Davy Brion&#8217;s NHibernate Northwind Sample as it&#8217;s a .NET 2.0 compiled solution and it&#8217;ll be acting as my [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-239</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sun, 18 May 2008 12:57:06 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-239</guid>
		<description>unfortunately i don&#039;t...</description>
		<content:encoded><![CDATA[<p>unfortunately i don&#8217;t&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-238</link>
		<dc:creator>Ivan</dc:creator>
		<pubDate>Sun, 18 May 2008 12:46:19 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-238</guid>
		<description>Do you have some data for this new structure? or sql-script to transfer data from old northwind to northwind by u?</description>
		<content:encoded><![CDATA[<p>Do you have some data for this new structure? or sql-script to transfer data from old northwind to northwind by u?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 2 Links Today (2008-01-16)</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-57</link>
		<dc:creator>2 Links Today (2008-01-16)</dc:creator>
		<pubDate>Wed, 16 Jan 2008 15:18:23 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-57</guid>
		<description>[...] NHibernate Mapping Examples « Davy Brion’s Blog [...]</description>
		<content:encoded><![CDATA[<p>[...] NHibernate Mapping Examples « Davy Brion’s Blog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2007/07/nhibernate-mapping-examples/comment-page-1/#comment-46</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 15 Oct 2007 20:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://ralinx.wordpress.com/2007/07/15/nhibernate-mapping-examples/#comment-46</guid>
		<description>did you make any changes to the file? because it works over here</description>
		<content:encoded><![CDATA[<p>did you make any changes to the file? because it works over here</p>
]]></content:encoded>
	</item>
</channel>
</rss>
