<?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: Build Your Own Data Access Layer: Hydrating Entities</title> <atom:link href="http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/feed/" rel="self" type="application/rss+xml" /><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/</link> <description>inquisitive: adjective. given to inquiry, research, or asking questions; eager for knowledge; intellectually curious</description> <lastBuildDate>Wed, 08 Feb 2012 11:42:42 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Anders Ivner</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22415</link> <dc:creator>Anders Ivner</dc:creator> <pubDate>Tue, 01 Sep 2009 08:51:37 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22415</guid> <description>Having used a similar approach myself a while ago, I ran into an issue &lt;a href=&quot;http://andersivner.blogspot.com/2008/05/nullable-enums.html&quot; rel=&quot;nofollow&quot;&gt;converting integers to nullable enums&lt;/a&gt;. It looks like it might affect your code as well.(Mine reflects &quot;on the fly&quot;, doesn&#039;t have an identity map (as my scenario didn&#039;t require one), and is generally more of a hack than yours. Still, it worked well enough.)</description> <content:encoded><![CDATA[<p>Having used a similar approach myself a while ago, I ran into an issue <a
href="http://andersivner.blogspot.com/2008/05/nullable-enums.html" rel="nofollow">converting integers to nullable enums</a>. It looks like it might affect your code as well.</p><p>(Mine reflects &#8220;on the fly&#8221;, doesn&#8217;t have an identity map (as my scenario didn&#8217;t require one), and is generally more of a hack than yours. Still, it worked well enough.)</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22368</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Sat, 29 Aug 2009 10:01:05 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22368</guid> <description>@Michaelthe last one... i have to build the metadata model when the application starts up, and generating the datasets at that point can be a bit too expensive at that time when you have many tables. And considering the fact that the datasets don&#039;t really offer any other real benefits, i don&#039;t really see the point in doing that.</description> <content:encoded><![CDATA[<p>@Michael</p><p>the last one&#8230; i have to build the metadata model when the application starts up, and generating the datasets at that point can be a bit too expensive at that time when you have many tables. And considering the fact that the datasets don&#8217;t really offer any other real benefits, i don&#8217;t really see the point in doing that.</p> ]]></content:encoded> </item> <item><title>By: Michael Brown</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22364</link> <dc:creator>Michael Brown</dc:creator> <pubDate>Fri, 28 Aug 2009 18:48:53 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22364</guid> <description>Fair enough, just curious. I wasn&#039;t aware of an app startup performance hit. Could you provide some links to information regarding it. Or do you mean looking at the metadata and creating the dataset as a performance hit?</description> <content:encoded><![CDATA[<p>Fair enough, just curious. I wasn&#8217;t aware of an app startup performance hit. Could you provide some links to information regarding it. Or do you mean looking at the metadata and creating the dataset as a performance hit?</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22345</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 26 Aug 2009 21:36:02 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22345</guid> <description>i really dislike datasets, even the strong-typed ones... they really wouldn&#039;t save that much code actually, and the overhead of using them as well as the time increase at application startup is just not worth it IMO</description> <content:encoded><![CDATA[<p>i really dislike datasets, even the strong-typed ones&#8230; they really wouldn&#8217;t save that much code actually, and the overhead of using them as well as the time increase at application startup is just not worth it IMO</p> ]]></content:encoded> </item> <item><title>By: Michael Brown</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22344</link> <dc:creator>Michael Brown</dc:creator> <pubDate>Wed, 26 Aug 2009 21:15:43 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22344</guid> <description>I have an interesting question, why not generate strong datasets from your table info metadata and use those instead of DataReaders. I think you can turn tracking off on your datasets and they will more or less function exactly as your dictionary does currently (with slightly added overhead but dramatically reduced complexity in your code).</description> <content:encoded><![CDATA[<p>I have an interesting question, why not generate strong datasets from your table info metadata and use those instead of DataReaders. I think you can turn tracking off on your datasets and they will more or less function exactly as your dictionary does currently (with slightly added overhead but dramatically reduced complexity in your code).</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22338</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 26 Aug 2009 07:05:18 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22338</guid> <description>@Alexread the other posts... this isn&#039;t about building a full blown ORM and i don&#039;t support the inheritance hierarchies which would cause problems with lazy loading</description> <content:encoded><![CDATA[<p>@Alex</p><p>read the other posts&#8230; this isn&#8217;t about building a full blown ORM and i don&#8217;t support the inheritance hierarchies which would cause problems with lazy loading</p> ]]></content:encoded> </item> <item><title>By: Alex Yakunin</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22337</link> <dc:creator>Alex Yakunin</dc:creator> <pubDate>Wed, 26 Aug 2009 07:02:10 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22337</guid> <description>And about CreateProxy(tableInfo, referenceInfo, foreignKeyValue): you can do this only if you exactly know the type mapped to referenceInfo, or this information is contained in foreignKeyValue. If you don&#039;t know the type exactly (e.g. there is an inheritance hierarchy), you can&#039;t do this.</description> <content:encoded><![CDATA[<p>And about CreateProxy(tableInfo, referenceInfo, foreignKeyValue): you can do this only if you exactly know the type mapped to referenceInfo, or this information is contained in foreignKeyValue. If you don&#8217;t know the type exactly (e.g. there is an inheritance hierarchy), you can&#8217;t do this.</p> ]]></content:encoded> </item> <item><title>By: Alex Yakunin</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22336</link> <dc:creator>Alex Yakunin</dc:creator> <pubDate>Wed, 26 Aug 2009 06:56:36 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22336</guid> <description>AFAIK, &quot;hydration&quot; is frequently referenced as &quot;materialization&quot;: http://www.google.com/search?q=ORM+materialization</description> <content:encoded><![CDATA[<p>AFAIK, &#8220;hydration&#8221; is frequently referenced as &#8220;materialization&#8221;: <a
href="http://www.google.com/search?q=ORM+materialization" rel="nofollow">http://www.google.com/search?q=ORM+materialization</a></p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22335</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 26 Aug 2009 06:49:44 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22335</guid> <description>yeah, it shortens the time needed to keep the datareaders open, and i used a dictionary instead of an array because i didn&#039;t want to deal with column positions and because it would be easy to retrieve specific values based on the column names (which i already have in the meta data model)</description> <content:encoded><![CDATA[<p>yeah, it shortens the time needed to keep the datareaders open, and i used a dictionary instead of an array because i didn&#8217;t want to deal with column positions and because it would be easy to retrieve specific values based on the column names (which i already have in the meta data model)</p> ]]></content:encoded> </item> <item><title>By: VirtualStaticVoid</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22334</link> <dc:creator>VirtualStaticVoid</dc:creator> <pubDate>Wed, 26 Aug 2009 06:37:38 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22334</guid> <description>I&#039;m curious as to why in the HydrateEntities() method, you load up a List&lt;IDictionary&gt;() with data from the reader first, and then create/load each entity.My first guess is to shorten the time you have an open connection to the database.</description> <content:encoded><![CDATA[<p>I&#8217;m curious as to why in the HydrateEntities() method, you load up a List&lt;IDictionary&gt;() with data from the reader first, and then create/load each entity.</p><p>My first guess is to shorten the time you have an open connection to the database.</p> ]]></content:encoded> </item> <item><title>By: Jason</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22333</link> <dc:creator>Jason</dc:creator> <pubDate>Wed, 26 Aug 2009 01:42:30 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22333</guid> <description>Ok, that makes more sense :)</description> <content:encoded><![CDATA[<p>Ok, that makes more sense <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Fabio Maulo</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22331</link> <dc:creator>Fabio Maulo</dc:creator> <pubDate>Tue, 25 Aug 2009 22:51:47 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22331</guid> <description>NHibernate light</description> <content:encoded><![CDATA[<p>NHibernate light</p> ]]></content:encoded> </item> <item><title>By: New and Notable 362 : Sam Gentile's Blog (if (DeveloperTask == Communication &#38;&#38; OS == Windows)</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22329</link> <dc:creator>New and Notable 362 : Sam Gentile's Blog (if (DeveloperTask == Communication &#38;&#38; OS == Windows)</dc:creator> <pubDate>Tue, 25 Aug 2009 21:49:43 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22329</guid> <description>[...] This is late but Davy Brion has started a series on Build Your Own Data Access Layer Series. Some posts include Out of the Box CRUD Functionality, Mapping Classes to Tables, and Hydrating Entities. [...]</description> <content:encoded><![CDATA[<p>[...] This is late but Davy Brion has started a series on Build Your Own Data Access Layer Series. Some posts include Out of the Box CRUD Functionality, Mapping Classes to Tables, and Hydrating Entities. [...]</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22327</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Tue, 25 Aug 2009 21:14:01 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22327</guid> <description>@Jasonin the previous post (http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-out-of-the-box-crud-functionality/) i mentioned the following about the GetByIdAction:&quot;This will first check the session level cache to see if this instance has already been retrieved in the current session (i’ll discuss the session in a later post) and if so, it will return that instance. If it’s not in the cache, it will create a SqlCommand and fill its CommandText property with a SQL string that is provided by the relevant TableInfo class. After that, it passes the SqlCommand to the EntityHydrater so it can return an actual entity instance.&quot;As for checking the cache after the records have been retrieved, that is explained in the next post, which will be published tomorrow ;)</description> <content:encoded><![CDATA[<p>@Jason</p><p>in the previous post (<a
href="http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-out-of-the-box-crud-functionality/" rel="nofollow">http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-out-of-the-box-crud-functionality/</a>) i mentioned the following about the GetByIdAction:</p><p>&#8220;This will first check the session level cache to see if this instance has already been retrieved in the current session (i’ll discuss the session in a later post) and if so, it will return that instance. If it’s not in the cache, it will create a SqlCommand and fill its CommandText property with a SQL string that is provided by the relevant TableInfo class. After that, it passes the SqlCommand to the EntityHydrater so it can return an actual entity instance.&#8221;</p><p>As for checking the cache after the records have been retrieved, that is explained in the next post, which will be published tomorrow <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Jason</title><link>http://davybrion.com/blog/2009/08/build-your-own-data-access-layer-hydrating-entities/comment-page-1/#comment-22326</link> <dc:creator>Jason</dc:creator> <pubDate>Tue, 25 Aug 2009 20:54:20 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1524#comment-22326</guid> <description>what value does session level cache provide is this scenario? you are not checking the cache until after the record is loaded from the database, so you&#039;re not gaining preformance be decreasing trips to the database. Would you want to check the session cache before constructing/executing the sql statement to reduce trips to the database?</description> <content:encoded><![CDATA[<p>what value does session level cache provide is this scenario? you are not checking the cache until after the record is loaded from the database, so you&#8217;re not gaining preformance be decreasing trips to the database. Would you want to check the session cache before constructing/executing the sql statement to reduce trips to the database?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/19 queries in 0.009 seconds using disk: basic
Object Caching 560/561 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d18sni7re4ly7f.cloudfront.net

Served from: davybrion.com @ 2012-02-09 03:24:03 -->
