<?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: Populating Entities From Stored Procedures With NHibernate</title>
	<atom:link href="http://elegantcode.com/2008/11/23/populating-entities-from-stored-procedures-with-nhibernate/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2008/11/23/populating-entities-from-stored-procedures-with-nhibernate/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=populating-entities-from-stored-procedures-with-nhibernate</link>
	<description></description>
	<lastBuildDate>Sun, 12 Feb 2012 18:54:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: mhanney</title>
		<link>http://elegantcode.com/2008/11/23/populating-entities-from-stored-procedures-with-nhibernate/comment-page-1/#comment-37935</link>
		<dc:creator>mhanney</dc:creator>
		<pubDate>Sun, 23 Nov 2008 22:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1553#comment-37935</guid>
		<description>That&#039;s cool. An alternative suggestion might be to create a db view that contains the result of a stored procedure, then map the view like a regular entity being sure to declare the properties as read-only in the mapping file. I&#039;ve seen this implemented when using Oracle for aggregate reporting because stored proc support wasn&#039;t there for Oracle. An example would be, get top 100 selling products in previous 24 hours. A view might not be applicable if you need to execute a procedure with params, and it makes several assumptions about the underlying db, but then so does exec dbo.SomeProcedure.  For returning compositions of read-only instances, projections, aliases and AliasToBean may be of interest.</description>
		<content:encoded><![CDATA[<p>That&#8217;s cool. An alternative suggestion might be to create a db view that contains the result of a stored procedure, then map the view like a regular entity being sure to declare the properties as read-only in the mapping file. I&#8217;ve seen this implemented when using Oracle for aggregate reporting because stored proc support wasn&#8217;t there for Oracle. An example would be, get top 100 selling products in previous 24 hours. A view might not be applicable if you need to execute a procedure with params, and it makes several assumptions about the underlying db, but then so does exec dbo.SomeProcedure.  For returning compositions of read-only instances, projections, aliases and AliasToBean may be of interest.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://elegantcode.com/2008/11/23/populating-entities-from-stored-procedures-with-nhibernate/comment-page-1/#comment-37931</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sun, 23 Nov 2008 21:49:02 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1553#comment-37931</guid>
		<description>it should definitely be possible with the return-join attribute, but i either hit a bug in nh2.0 or i&#039;m doing something stupid somewhere

gonna look into it</description>
		<content:encoded><![CDATA[<p>it should definitely be possible with the return-join attribute, but i either hit a bug in nh2.0 or i&#8217;m doing something stupid somewhere</p>
<p>gonna look into it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://elegantcode.com/2008/11/23/populating-entities-from-stored-procedures-with-nhibernate/comment-page-1/#comment-37926</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sun, 23 Nov 2008 20:43:54 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1553#comment-37926</guid>
		<description>i believe it&#039;s possible yes... but only if the proc returns the full graph

i&#039;m gonna try it out and i&#039;ll let you know :)</description>
		<content:encoded><![CDATA[<p>i believe it&#8217;s possible yes&#8230; but only if the proc returns the full graph</p>
<p>i&#8217;m gonna try it out and i&#8217;ll let you know <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarod</title>
		<link>http://elegantcode.com/2008/11/23/populating-entities-from-stored-procedures-with-nhibernate/comment-page-1/#comment-37924</link>
		<dc:creator>Jarod</dc:creator>
		<pubDate>Sun, 23 Nov 2008 20:33:57 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1553#comment-37924</guid>
		<description>Thats slick Davy. What if your proc returns a graph, could you map on to it?

Lets say we want to shape 3 entities out of this proc... Product, Category &amp; Inventory..

Product.Id
Product.Name

Product.Category.ID
Product.Category.Name

Product.Inventory.OnHand
Product.Inventory.InStock</description>
		<content:encoded><![CDATA[<p>Thats slick Davy. What if your proc returns a graph, could you map on to it?</p>
<p>Lets say we want to shape 3 entities out of this proc&#8230; Product, Category &amp; Inventory..</p>
<p>Product.Id<br />
Product.Name</p>
<p>Product.Category.ID<br />
Product.Category.Name</p>
<p>Product.Inventory.OnHand<br />
Product.Inventory.InStock</p>
]]></content:encoded>
	</item>
</channel>
</rss>

