<?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: Summer of NHibernate Session 05: Modeling Foreign-Key Relationships in NHibernate screencast is available</title>
	<atom:link href="http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/feed/" rel="self" type="application/rss+xml" />
	<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/</link>
	<description>Miscellaneous musings on life, .NET development, and related things that don't really matter</description>
	<pubDate>Thu, 17 May 2012 21:10:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: japel</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-29600</link>
		<dc:creator>japel</dc:creator>
		<pubDate>Tue, 23 Mar 2010 12:50:06 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-29600</guid>
		<description>I'm having a problem at this point. After creating the mapping file for Order, when I run my tests I get 18 out of 23 passed.
The 5 tests failing are throwing the same exception:

NHibernate.HibernateException
Message: Illegal attempt to associate a collection with two open sessions

I don't understand it. Which 2 open sessions are there?</description>
		<content:encoded><![CDATA[<p>I&#8217;m having a problem at this point. After creating the mapping file for Order, when I run my tests I get 18 out of 23 passed.<br />
The 5 tests failing are throwing the same exception:</p>
<p>NHibernate.HibernateException<br />
Message: Illegal attempt to associate a collection with two open sessions</p>
<p>I don&#8217;t understand it. Which 2 open sessions are there?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mynkow</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-21772</link>
		<dc:creator>mynkow</dc:creator>
		<pubDate>Tue, 06 Oct 2009 12:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-21772</guid>
		<description>Well, actually I did not understand my business guy. So there is no problem. Sorry for the spam :)</description>
		<content:encoded><![CDATA[<p>Well, actually I did not understand my business guy. So there is no problem. Sorry for the spam <img src='http://unhandled-exceptions.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbohlen</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-21758</link>
		<dc:creator>sbohlen</dc:creator>
		<pubDate>Tue, 06 Oct 2009 00:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-21758</guid>
		<description>@mynkow:

Not sure I understand...is this other than just a has-many relationship --?</description>
		<content:encoded><![CDATA[<p>@mynkow:</p>
<p>Not sure I understand&#8230;is this other than just a has-many relationship &#8211;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mynkow</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-21741</link>
		<dc:creator>mynkow</dc:creator>
		<pubDate>Mon, 05 Oct 2009 06:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-21741</guid>
		<description>Problem1 is solved. What about problem2?</description>
		<content:encoded><![CDATA[<p>Problem1 is solved. What about problem2?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mynkow</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-21615</link>
		<dc:creator>mynkow</dc:creator>
		<pubDate>Fri, 02 Oct 2009 17:50:33 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-21615</guid>
		<description>Hi Steve.

Problem1:
I have a project where NHib creates the database from mapping file. The problem is that I want to add a ForeignKey without defining any set, map, list or bag. Is that possible?

For example: I have [Warehouse] table and [Transfer] table. I transfer products from one warehouse to another. In [Transfer] I have two columns call [Warehouse_From] and [Warehouse_To]. How can I define in mapping file two ForeignKeys to the parent table [Warehouse]?

Problem2:
Is it possible this kind of relation and how to define it in NHib. I have [Parent] table and [Child] table. I need a foreign key and in the child class I have IList for example.

Thank you!!!

PS: Greetings from Bulgaria.</description>
		<content:encoded><![CDATA[<p>Hi Steve.</p>
<p>Problem1:<br />
I have a project where NHib creates the database from mapping file. The problem is that I want to add a ForeignKey without defining any set, map, list or bag. Is that possible?</p>
<p>For example: I have [Warehouse] table and [Transfer] table. I transfer products from one warehouse to another. In [Transfer] I have two columns call [Warehouse_From] and [Warehouse_To]. How can I define in mapping file two ForeignKeys to the parent table [Warehouse]?</p>
<p>Problem2:<br />
Is it possible this kind of relation and how to define it in NHib. I have [Parent] table and [Child] table. I need a foreign key and in the child class I have IList for example.</p>
<p>Thank you!!!</p>
<p>PS: Greetings from Bulgaria.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve b.</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-43</link>
		<dc:creator>steve b.</dc:creator>
		<pubDate>Fri, 25 Jul 2008 18:19:33 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-43</guid>
		<description>@Tom:

re: mbunit vs nunit, no real reason for the choice will be evident in the summer-of-nhibernate screencasts since I don't (as of now) really intend to use any mbunit-specific capabilities in the series.  

In the real-world, I DO have a preference since for quite some time mbunit offered features that nunit lacked (rowtests, etc.).  With the recent near-release of nunit 2.5 it sounds to me from the 'advertised' feature list that nuninit is moving back closer to feature-parity with mbunit 2.4 so this distinction may start to make less sense.

My present (personal) plan is to wait until both nunit 2.5 and mbunit 3.0 are fully-baked and do a new comparison between them to decide where I (personally) want to go next.  I'm somewhat torn between giving my allegience to nunit for their being 'first' in .net and blazing the trail the other *Unit frameworks (for .net) have followed in or giving it to mbunit for so effectively pushing the boundaries of 'accepted' unit test capabilities (the rowtest, the combinatorial test, etc.)

re: 1:1 relationships, that's coming in the same segment where we discuss m:n relations (not quite in part 06, but in part 07 it looks like as of now).</description>
		<content:encoded><![CDATA[<p>@Tom:</p>
<p>re: mbunit vs nunit, no real reason for the choice will be evident in the summer-of-nhibernate screencasts since I don&#8217;t (as of now) really intend to use any mbunit-specific capabilities in the series.  </p>
<p>In the real-world, I DO have a preference since for quite some time mbunit offered features that nunit lacked (rowtests, etc.).  With the recent near-release of nunit 2.5 it sounds to me from the &#8216;advertised&#8217; feature list that nuninit is moving back closer to feature-parity with mbunit 2.4 so this distinction may start to make less sense.</p>
<p>My present (personal) plan is to wait until both nunit 2.5 and mbunit 3.0 are fully-baked and do a new comparison between them to decide where I (personally) want to go next.  I&#8217;m somewhat torn between giving my allegience to nunit for their being &#8216;first&#8217; in .net and blazing the trail the other *Unit frameworks (for .net) have followed in or giving it to mbunit for so effectively pushing the boundaries of &#8216;accepted&#8217; unit test capabilities (the rowtest, the combinatorial test, etc.)</p>
<p>re: 1:1 relationships, that&#8217;s coming in the same segment where we discuss m:n relations (not quite in part 06, but in part 07 it looks like as of now).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-41</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 25 Jul 2008 07:47:50 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-41</guid>
		<description>@steve b. I know, funny thing is; I've tried pc at home and my work. I'm using MbUnit Version 1.0.2700.29885 at work. 

Other strange anomaly is that since last night I don't seem to be able to generate the TestData.xml; the BackupData.xml is created however. A simple rename was sufficient to get it all working again. 

I have tried the original download but that didn't work out for me. Are you using MbUnit for any specific reason (in terms of the training series) over NUnit? 

Next to that; will you be covering 1:1 relationships as well in the next one?</description>
		<content:encoded><![CDATA[<p>@steve b. I know, funny thing is; I&#8217;ve tried pc at home and my work. I&#8217;m using MbUnit Version 1.0.2700.29885 at work. </p>
<p>Other strange anomaly is that since last night I don&#8217;t seem to be able to generate the TestData.xml; the BackupData.xml is created however. A simple rename was sufficient to get it all working again. </p>
<p>I have tried the original download but that didn&#8217;t work out for me. Are you using MbUnit for any specific reason (in terms of the training series) over NUnit? </p>
<p>Next to that; will you be covering 1:1 relationships as well in the next one?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael McGuire</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-38</link>
		<dc:creator>Michael McGuire</dc:creator>
		<pubDate>Thu, 24 Jul 2008 12:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-38</guid>
		<description>I have been running the code downloads with R# 4.0 and the mbunit plugin so far without any dramas. I did try with the galio plugin to start with and got some oddities like the tests would show in the testrunner but not run and or couldn't be run in debug, but the mbunit plugin seems all good.</description>
		<content:encoded><![CDATA[<p>I have been running the code downloads with R# 4.0 and the mbunit plugin so far without any dramas. I did try with the galio plugin to start with and got some oddities like the tests would show in the testrunner but not run and or couldn&#8217;t be run in debug, but the mbunit plugin seems all good.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve b.</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-37</link>
		<dc:creator>steve b.</dc:creator>
		<pubDate>Thu, 24 Jul 2008 11:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-37</guid>
		<description>@Tom:

That's really odd -- I wonder what that issue could be...USUALLY that message sounds to me like its similar to what happens if your cursor is accidentally inside a method in your class-under-test (e.g., the NhibernateDataProvider in this case) rather than your testfixture (e.g., the NHiberrnateDataProviderTest class in this case) when you rt-click and ask TestDriven.NET to run your tests.

The testrunner cannot instantiate its test-fixture class and invoke the MAIN method on it that is (I'm pretty certain) the method that mbunit is using to instantiate an in instance of your test fixture and exectute any method it finds in there that has a [Test] attribute.

Glad you got it running with NUnit, but could you maybe try again with the original un-modified code download and just ensure that you're properly within the [TestFixture]-attributed class when you invoke TestDrvien.NET to run the tests --?

Just an idea; hope this helps.</description>
		<content:encoded><![CDATA[<p>@Tom:</p>
<p>That&#8217;s really odd &#8212; I wonder what that issue could be&#8230;USUALLY that message sounds to me like its similar to what happens if your cursor is accidentally inside a method in your class-under-test (e.g., the NhibernateDataProvider in this case) rather than your testfixture (e.g., the NHiberrnateDataProviderTest class in this case) when you rt-click and ask TestDriven.NET to run your tests.</p>
<p>The testrunner cannot instantiate its test-fixture class and invoke the MAIN method on it that is (I&#8217;m pretty certain) the method that mbunit is using to instantiate an in instance of your test fixture and exectute any method it finds in there that has a [Test] attribute.</p>
<p>Glad you got it running with NUnit, but could you maybe try again with the original un-modified code download and just ensure that you&#8217;re properly within the [TestFixture]-attributed class when you invoke TestDrvien.NET to run the tests &#8211;?</p>
<p>Just an idea; hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve b.</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/comment-page-1/#comment-36</link>
		<dc:creator>steve b.</dc:creator>
		<pubDate>Thu, 24 Jul 2008 11:07:39 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/07/19/summer-of-nhibernate-session-05-modeling-foreign-key-relationships-in-nhibernate-screencast-is-available/#comment-36</guid>
		<description>@Eric:

I'll look into both of those suggestions (wmv and fonts); thanks for the feedback.</description>
		<content:encoded><![CDATA[<p>@Eric:</p>
<p>I&#8217;ll look into both of those suggestions (wmv and fonts); thanks for the feedback.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

