<?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: Transparent Query Batching Through Your Repository</title> <atom:link href="http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/feed/" rel="self" type="application/rss+xml" /><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/</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: Elegant Code &#187; Tips for ORM Data Access</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-22940</link> <dc:creator>Elegant Code &#187; Tips for ORM Data Access</dc:creator> <pubDate>Thu, 12 Nov 2009 22:37:18 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-22940</guid> <description>[...] requests to your services and database, especially if you are in a web or distributed [...]</description> <content:encoded><![CDATA[<p>[...] requests to your services and database, especially if you are in a web or distributed [...]</p> ]]></content:encoded> </item> <item><title>By: The Inquisitive Coder &#8211; Davy Brion&#8217;s Blog &#187; Blog Archive &#187; Stop Exposing Collections Already!</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-22830</link> <dc:creator>The Inquisitive Coder &#8211; Davy Brion&#8217;s Blog &#187; Blog Archive &#187; Stop Exposing Collections Already!</dc:creator> <pubDate>Wed, 28 Oct 2009 05:01:18 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-22830</guid> <description>[...] The problem that i have with exposing a collection&#8217;s values through a type which enables other pieces of code to modify the state of that collection is that it is effectively a pretty big breach of encapsulation. You no longer have sole control over the contents of the collection. Anyone can effectively add and remove elements from the collection, or even clear them entirely, without your object knowing about it. Obviously, this can cause subtle side-effects in the behavior of your object. Which can (and sooner or later will) lead to some quality time between you and your debugger. You also no longer have the ability to easily change the type of collection you&#8217;re using which might prevent certain future improvements that you can make to a class. And in case you&#8217;re wondering why you&#8217;d want to change the type of collection, check out an example where the benefit was huge. [...]</description> <content:encoded><![CDATA[<p>[...] The problem that i have with exposing a collection&#8217;s values through a type which enables other pieces of code to modify the state of that collection is that it is effectively a pretty big breach of encapsulation. You no longer have sole control over the contents of the collection. Anyone can effectively add and remove elements from the collection, or even clear them entirely, without your object knowing about it. Obviously, this can cause subtle side-effects in the behavior of your object. Which can (and sooner or later will) lead to some quality time between you and your debugger. You also no longer have the ability to easily change the type of collection you&#8217;re using which might prevent certain future improvements that you can make to a class. And in case you&#8217;re wondering why you&#8217;d want to change the type of collection, check out an example where the benefit was huge. [...]</p> ]]></content:encoded> </item> <item><title>By: Resti Martinez</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-22652</link> <dc:creator>Resti Martinez</dc:creator> <pubDate>Mon, 05 Oct 2009 13:25:15 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-22652</guid> <description>Thanks Davy.http://nhjira.koah.net/browse/NH-1982</description> <content:encoded><![CDATA[<p>Thanks Davy.</p><p><a
href="http://nhjira.koah.net/browse/NH-1982" rel="nofollow">http://nhjira.koah.net/browse/NH-1982</a></p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-22651</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 05 Oct 2009 10:40:34 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-22651</guid> <description>@Restican you create a reproducable test case and create an issue at the nhibernate jira? (http://jira.nhforge.org/)</description> <content:encoded><![CDATA[<p>@Resti</p><p>can you create a reproducable test case and create an issue at the nhibernate jira? (<a
href="http://jira.nhforge.org/" rel="nofollow">http://jira.nhforge.org/</a>)</p> ]]></content:encoded> </item> <item><title>By: Resti Martinez</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-22650</link> <dc:creator>Resti Martinez</dc:creator> <pubDate>Mon, 05 Oct 2009 10:37:37 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-22650</guid> <description>Attention, this test fails (for me) in SQL Server 2008 (note Future)using (var session = factory.OpenSession())
using (var transaction = session.BeginTransaction()) { }
{
Person person = new Person();
session.Save(person); //Person is mapped with native identity
session.Delete(person);
Assert.IsFalse(new List(session.CreateCriteria(typeof(Person)).Future()).Contains(person));
transaction.Rollback();
}However, this test workusing (var session = factory.OpenSession())
using (var transaction = session.BeginTransaction()) { }
{
Person user = new Person();
session.Save(person); //Person is mapped with native identity
session.Delete(person);
Assert.IsFalse(session.CreateCriteria(typeof(Person)).List().Contains(person));
transaction.Rollback();
}i don&#039;t know the cause</description> <content:encoded><![CDATA[<p>Attention, this test fails (for me) in SQL Server 2008 (note Future)</p><p>using (var session = factory.OpenSession())<br
/> using (var transaction = session.BeginTransaction()) { }<br
/> {<br
/> Person person = new Person();<br
/> session.Save(person); //Person is mapped with native identity<br
/> session.Delete(person);</p><p> Assert.IsFalse(new List(session.CreateCriteria(typeof(Person)).Future()).Contains(person));</p><p> transaction.Rollback();<br
/> }</p><p>However, this test work</p><p>using (var session = factory.OpenSession())<br
/> using (var transaction = session.BeginTransaction()) { }<br
/> {<br
/> Person user = new Person();<br
/> session.Save(person); //Person is mapped with native identity<br
/> session.Delete(person);</p><p> Assert.IsFalse(session.CreateCriteria(typeof(Person)).List().Contains(person));</p><p> transaction.Rollback();<br
/> }</p><p>i don&#8217;t know the cause</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-12659</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Fri, 17 Apr 2009 08:25:33 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-12659</guid> <description>NHibernate sessions are inherently not thread safe, as stated in the docs.</description> <content:encoded><![CDATA[<p>NHibernate sessions are inherently not thread safe, as stated in the docs.</p> ]]></content:encoded> </item> <item><title>By: liviu</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-12658</link> <dc:creator>liviu</dc:creator> <pubDate>Fri, 17 Apr 2009 08:23:30 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-12658</guid> <description>What if i pass the collection on another thread?
:-0</description> <content:encoded><![CDATA[<p>What if i pass the collection on another thread?<br
/> :-0</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-11043</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 02 Apr 2009 11:05:17 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-11043</guid> <description>hah, i didn&#039;t even know MultiCriteria had the SetCacheable method :)</description> <content:encoded><![CDATA[<p>hah, i didn&#8217;t even know MultiCriteria had the SetCacheable method <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: Ken Tong</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-11041</link> <dc:creator>Ken Tong</dc:creator> <pubDate>Thu, 02 Apr 2009 10:48:49 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-11041</guid> <description>Davy,Thanks. Just FYI, you could call MultiCriteria.SetCacheable(true) to make to whole batch cacheable.I would call MultiCriteria.SetCacheable(true) for the batch that I manually created. But I would not figure out an elegant way to work with caching Future() results.</description> <content:encoded><![CDATA[<p>Davy,</p><p>Thanks. Just FYI, you could call MultiCriteria.SetCacheable(true) to make to whole batch cacheable.</p><p>I would call MultiCriteria.SetCacheable(true) for the batch that I manually created. But I would not figure out an elegant way to work with caching Future() results.</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-11030</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 02 Apr 2009 08:22:05 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-11030</guid> <description>@KenIndeed, queries are not cached when used with Future or MultiCriteria/MultiQuery directlyi use the query cache in some occasions, but then my specific Find method for that query simply creates the criteria and executes it through the current session directly</description> <content:encoded><![CDATA[<p>@Ken</p><p>Indeed, queries are not cached when used with Future or MultiCriteria/MultiQuery directly</p><p>i use the query cache in some occasions, but then my specific Find method for that query simply creates the criteria and executes it through the current session directly</p> ]]></content:encoded> </item> <item><title>By: Ken Tong</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-11016</link> <dc:creator>Ken Tong</dc:creator> <pubDate>Thu, 02 Apr 2009 06:04:31 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-11016</guid> <description>Davy,Do you use query cache? It seems to me that Future() will make all queries become non-cacheable. Any experience you can share on this?</description> <content:encoded><![CDATA[<p>Davy,</p><p>Do you use query cache? It seems to me that Future() will make all queries become non-cacheable. Any experience you can share on this?</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-10967</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 01 Apr 2009 15:11:52 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-10967</guid> <description>No idea, never used it as i am waiting for the new Linq NH implementation before i try Linq queries with NHibernateI honestly prefer the Criteria API</description> <content:encoded><![CDATA[<p>No idea, never used it as i am waiting for the new Linq NH implementation before i try Linq queries with NHibernate</p><p>I honestly prefer the Criteria API</p> ]]></content:encoded> </item> <item><title>By: Valeriu Caraulean</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-10966</link> <dc:creator>Valeriu Caraulean</dc:creator> <pubDate>Wed, 01 Apr 2009 15:09:42 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-10966</guid> <description>Does it fit with Linq to NHibernate?</description> <content:encoded><![CDATA[<p>Does it fit with Linq to NHibernate?</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-10964</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 01 Apr 2009 14:53:27 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-10964</guid> <description>yeah, that&#039;s what batching statements is usually about ;)</description> <content:encoded><![CDATA[<p>yeah, that&#8217;s what batching statements is usually about <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: Frederik</title><link>http://davybrion.com/blog/2009/04/transparent-query-batching-through-your-repository/comment-page-1/#comment-10962</link> <dc:creator>Frederik</dc:creator> <pubDate>Wed, 01 Apr 2009 14:27:25 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=1200#comment-10962</guid> <description>What&#039;s the advantage of this ?
Am I right to suppose that you &lt;em&gt;can&lt;/em&gt; minimize roundtrips to the DB when using Future &amp; FutureValue ?
(Multiple statements are executed with one roundtrip if possible ? )</description> <content:encoded><![CDATA[<p>What&#8217;s the advantage of this ?<br
/> Am I right to suppose that you <em>can</em> minimize roundtrips to the DB when using Future &amp; FutureValue ?<br
/> (Multiple statements are executed with one roundtrip if possible ? )</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:21:41 -->
