<?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 11 Screencast: Techniques for Modeling Inheritance in the Database is now available</title>
	<atom:link href="http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/feed/" rel="self" type="application/rss+xml" />
	<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/</link>
	<description>Miscellaneous musings on life, .NET development, and related things that don't really matter</description>
	<pubDate>Thu, 17 May 2012 21:14:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chev</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-17787</link>
		<dc:creator>Chev</dc:creator>
		<pubDate>Mon, 29 Jun 2009 16:17:34 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-17787</guid>
		<description>Mapping file attached:


  
    
    
      
    
    
    
    

    
    
    
      
      
    
    
  
</description>
		<content:encoded><![CDATA[<p>Mapping file attached:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chev</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-17786</link>
		<dc:creator>Chev</dc:creator>
		<pubDate>Mon, 29 Jun 2009 16:14:47 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-17786</guid>
		<description>Steve

Thanks once again for taking the time to do these sessions. As great as nhibernate is, there is a learning curve!

I have a question regarding multiple levels of inheritance. I have a FinTransaction abstract class modeling financial transactions. 

I have a derived class called Refunds that model relevant Refund info. I have another derived abstract class that models Payments. Payments has subclasses like CCPayment, CashPayment etc

I have started off with table per subclass and can map the FinTransaction &#38; Refund sublass fine. How does one map the Payment abstract class and relevant subclasses?
 
Class diagram attached here:
http://blackdiamonddev.com/fin.png

Any help greatly appreciated as I am going buts here :-)</description>
		<content:encoded><![CDATA[<p>Steve</p>
<p>Thanks once again for taking the time to do these sessions. As great as nhibernate is, there is a learning curve!</p>
<p>I have a question regarding multiple levels of inheritance. I have a FinTransaction abstract class modeling financial transactions. </p>
<p>I have a derived class called Refunds that model relevant Refund info. I have another derived abstract class that models Payments. Payments has subclasses like CCPayment, CashPayment etc</p>
<p>I have started off with table per subclass and can map the FinTransaction &amp; Refund sublass fine. How does one map the Payment abstract class and relevant subclasses?</p>
<p>Class diagram attached here:<br />
<a href="http://blackdiamonddev.com/fin.png" rel="nofollow">http://blackdiamonddev.com/fin.png</a></p>
<p>Any help greatly appreciated as I am going buts here <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: Recent Faves Tagged With "techniques" : MyNetFaves</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-14988</link>
		<dc:creator>Recent Faves Tagged With "techniques" : MyNetFaves</dc:creator>
		<pubDate>Tue, 12 May 2009 10:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-14988</guid>
		<description>[...] by westernsuffolkboces &#124; 6 days ago      Web Analytics First saved by smartia &#124; 6 days ago      Summer of NHibernate Session 11 Screencast: Techniques for ... First saved by TakaSohma1 &#124; 8 days ago      Fewer Natural Oils Means Drier Skin First saved by [...]</description>
		<content:encoded><![CDATA[<p>[...] by westernsuffolkboces | 6 days ago      Web Analytics First saved by smartia | 6 days ago      Summer of NHibernate Session 11 Screencast: Techniques for &#8230; First saved by TakaSohma1 | 8 days ago      Fewer Natural Oils Means Drier Skin First saved by [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Recent Links Tagged With "exceptions" - JabberTags</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-8831</link>
		<dc:creator>Recent Links Tagged With "exceptions" - JabberTags</dc:creator>
		<pubDate>Wed, 21 Jan 2009 22:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-8831</guid>
		<description>[...] public links &#62;&#62; exceptions   Summer of NHibernate Session 11 Screencast: Techniques for ... Saved by jenadamz on Fri 09-1-2009   Built in Exceptions you should use Saved by grumpygrim on Fri [...]</description>
		<content:encoded><![CDATA[<p>[...] public links &gt;&gt; exceptions   Summer of NHibernate Session 11 Screencast: Techniques for &#8230; Saved by jenadamz on Fri 09-1-2009   Built in Exceptions you should use Saved by grumpygrim on Fri [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Corey</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-792</link>
		<dc:creator>Corey</dc:creator>
		<pubDate>Wed, 03 Sep 2008 04:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-792</guid>
		<description>That did the trick, thanks. I did however end up choosing to use a one-to-one relationship rather than inheritance, purely because I didn't really like having to evict my entity and then perform the promotion. Luckily the compromise still seems pretty consistent with the domain and doesn't feel like a compromise. Thanks again for the help.</description>
		<content:encoded><![CDATA[<p>That did the trick, thanks. I did however end up choosing to use a one-to-one relationship rather than inheritance, purely because I didn&#8217;t really like having to evict my entity and then perform the promotion. Luckily the compromise still seems pretty consistent with the domain and doesn&#8217;t feel like a compromise. Thanks again for the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbohlen</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-769</link>
		<dc:creator>sbohlen</dc:creator>
		<pubDate>Tue, 02 Sep 2008 20:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-769</guid>
		<description>@Ray:

I didn't have time to cover using abstract base classes or interfaces as the root of the inheritance hierarchy in the screencast but read comment #7 above (apply the abstract="true" attribute to the superclass mapping tag) for a beginning of where to look for anwers to this one.</description>
		<content:encoded><![CDATA[<p>@Ray:</p>
<p>I didn&#8217;t have time to cover using abstract base classes or interfaces as the root of the inheritance hierarchy in the screencast but read comment #7 above (apply the abstract=&#8221;true&#8221; attribute to the superclass mapping tag) for a beginning of where to look for anwers to this one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-762</link>
		<dc:creator>Ray</dc:creator>
		<pubDate>Tue, 02 Sep 2008 16:15:30 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-762</guid>
		<description>Great session Steve demonstrating the two inheritance implementations!  I didn't see any reference to supporting Abstract classes.  I have a series of ???Type classes that inherit from an abstract BaseType class, which is simply a data abstraction of the properties in common with all of my ???Type derived classes.  I thought I would use the table-per-subclass strategy, but how can I map the abstract class so that nHibernate will not be expecting an underlying table for the BaseType abstract class?

Thanks,

-- Ray</description>
		<content:encoded><![CDATA[<p>Great session Steve demonstrating the two inheritance implementations!  I didn&#8217;t see any reference to supporting Abstract classes.  I have a series of ???Type classes that inherit from an abstract BaseType class, which is simply a data abstraction of the properties in common with all of my ???Type derived classes.  I thought I would use the table-per-subclass strategy, but how can I map the abstract class so that nHibernate will not be expecting an underlying table for the BaseType abstract class?</p>
<p>Thanks,</p>
<p>&#8211; Ray</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbohlen</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-732</link>
		<dc:creator>sbohlen</dc:creator>
		<pubDate>Mon, 01 Sep 2008 23:33:05 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-732</guid>
		<description>@JAmes:

I agree that I was leaving the impression that table-per-class-hierarchy was the more performant approach (and I still think it *usually* is) but your example definitely points out a very real scenario for which it might very well not be.

I also agree that non-null constraints SHOULD be surfaced in the database (usually in addition to their being modeled in the domiain classes) and this is generally why I tend to prefer the table-per-subclass approach as it tends to feel more natural to me (e.g., most like I would be inclined to model things if I weren't using NHibernate).

Thanks again for the continued comments~!</description>
		<content:encoded><![CDATA[<p>@JAmes:</p>
<p>I agree that I was leaving the impression that table-per-class-hierarchy was the more performant approach (and I still think it *usually* is) but your example definitely points out a very real scenario for which it might very well not be.</p>
<p>I also agree that non-null constraints SHOULD be surfaced in the database (usually in addition to their being modeled in the domiain classes) and this is generally why I tend to prefer the table-per-subclass approach as it tends to feel more natural to me (e.g., most like I would be inclined to model things if I weren&#8217;t using NHibernate).</p>
<p>Thanks again for the continued comments~!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-731</link>
		<dc:creator>James</dc:creator>
		<pubDate>Mon, 01 Sep 2008 23:04:30 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-731</guid>
		<description>@Steve:

Thanks for the responses.

I agree that the classes should provide handling of nulls, i.e. implement the rules around the properties etc - It's just nice to have such constraints in the database too, for reasons like defensive programming and revealing intent etc.

I appreciate that the performance topic is certainly not a simple one - I really only mentioned it here, as I got the impression (rightly or wrongly) from the screen-cast that the table per hierarchy approach was being described as the more performant one, which seemed like an over-simplification, as there are probably scenarios when that wouldn't be the case.</description>
		<content:encoded><![CDATA[<p>@Steve:</p>
<p>Thanks for the responses.</p>
<p>I agree that the classes should provide handling of nulls, i.e. implement the rules around the properties etc - It&#8217;s just nice to have such constraints in the database too, for reasons like defensive programming and revealing intent etc.</p>
<p>I appreciate that the performance topic is certainly not a simple one - I really only mentioned it here, as I got the impression (rightly or wrongly) from the screen-cast that the table per hierarchy approach was being described as the more performant one, which seemed like an over-simplification, as there are probably scenarios when that wouldn&#8217;t be the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbohlen</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/comment-page-1/#comment-712</link>
		<dc:creator>sbohlen</dc:creator>
		<pubDate>Mon, 01 Sep 2008 13:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/08/29/summer-of-nhibernate-session-11-screencast-techniques-for-modeling-inheritance-in-the-database-is-now-available/#comment-712</guid>
		<description>@Corey:

that method signature should be just...

public PreferredCustomer PromoteToPreferred()

...with no passed in Customer instance since this method is actually *IN* the Customer class and so of course can just operate on its own instance of Customer :)</description>
		<content:encoded><![CDATA[<p>@Corey:</p>
<p>that method signature should be just&#8230;</p>
<p>public PreferredCustomer PromoteToPreferred()</p>
<p>&#8230;with no passed in Customer instance since this method is actually *IN* the Customer class and so of course can just operate on its own instance of Customer <img src='http://unhandled-exceptions.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

