<?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: NHibernate ICriteria Count and the missing &quot;Having&quot;</title>
	<atom:link href="http://www.codewrecks.com/blog/index.php/2008/02/27/nhibernate-icriteria-count-and-the-missing-of-having-clause/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codewrecks.com/blog/index.php/2008/02/27/nhibernate-icriteria-count-and-the-missing-of-having-clause/</link>
	<description>Wrecks of code floating in the sea of Internet By Ricci Gian Maria</description>
	<lastBuildDate>Thu, 09 Feb 2012 16:15:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: alkampfer</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/02/27/nhibernate-icriteria-count-and-the-missing-of-having-clause/comment-page-1/#comment-2139</link>
		<dc:creator>alkampfer</dc:creator>
		<pubDate>Fri, 20 Mar 2009 09:58:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.nablasoft.com/Alkampfer/?p=152#comment-2139</guid>
		<description>Thanks! It was a little tricky to solve it.</description>
		<content:encoded><![CDATA[<p>Thanks! It was a little tricky to solve it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kiennx</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/02/27/nhibernate-icriteria-count-and-the-missing-of-having-clause/comment-page-1/#comment-2137</link>
		<dc:creator>kiennx</dc:creator>
		<pubDate>Fri, 20 Mar 2009 03:00:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.nablasoft.com/Alkampfer/?p=152#comment-2137</guid>
		<description>Thank you very much! I google for it for longs. Now I can have a little rest.</description>
		<content:encoded><![CDATA[<p>Thank you very much! I google for it for longs. Now I can have a little rest.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alkampfer</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/02/27/nhibernate-icriteria-count-and-the-missing-of-having-clause/comment-page-1/#comment-2130</link>
		<dc:creator>alkampfer</dc:creator>
		<pubDate>Fri, 13 Mar 2009 07:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.nablasoft.com/Alkampfer/?p=152#comment-2130</guid>
		<description>The solution is really simple you need only to change the condition of the subquery

 ICriteria c = session.CreateCriteria(typeof(Customer2), &quot;RootClass&quot;);

            DetachedCriteria d = DetachedCriteria.For(typeof(Customer2))
                .CreateAlias(&quot;Orders&quot;, &quot;Orders&quot;)
                .SetProjection(Projections.ProjectionList()
                    .Add(Projections.RowCount()))
                .Add(Property.ForName(&quot;Id&quot;).EqProperty(&quot;RootClass.Id&quot;));

            c.Add(Subqueries.Eq(0, d)); //Here is the modification
            IList&lt;Customer2&gt; result = c.List&lt;Customer2&gt;();
            Assert.That(result.Count, Is.EqualTo(123));</description>
		<content:encoded><![CDATA[<p>The solution is really simple you need only to change the condition of the subquery</p>
<p> ICriteria c = session.CreateCriteria(typeof(Customer2), &#8220;RootClass&#8221;);</p>
<p>            DetachedCriteria d = DetachedCriteria.For(typeof(Customer2))<br />
                .CreateAlias(&#8220;Orders&#8221;, &#8220;Orders&#8221;)<br />
                .SetProjection(Projections.ProjectionList()<br />
                    .Add(Projections.RowCount()))<br />
                .Add(Property.ForName(&#8220;Id&#8221;).EqProperty(&#8220;RootClass.Id&#8221;));</p>
<p>            c.Add(Subqueries.Eq(0, d)); //Here is the modification<br />
            IList<customer2> result = c.List</customer2><customer2>();<br />
            Assert.That(result.Count, Is.EqualTo(123));</customer2></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antonio</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/02/27/nhibernate-icriteria-count-and-the-missing-of-having-clause/comment-page-1/#comment-2128</link>
		<dc:creator>Antonio</dc:creator>
		<pubDate>Thu, 12 Mar 2009 11:00:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.nablasoft.com/Alkampfer/?p=152#comment-2128</guid>
		<description>I have a similiar problem, I would want to express with ICriteria:

Select all EntityContainer that have NO EntityTest in the Test collection

or in other words how to select parent that haven&#039;t children. How it is possible to interrogate the Count property?
Thanks in advance</description>
		<content:encoded><![CDATA[<p>I have a similiar problem, I would want to express with ICriteria:</p>
<p>Select all EntityContainer that have NO EntityTest in the Test collection</p>
<p>or in other words how to select parent that haven&#8217;t children. How it is possible to interrogate the Count property?<br />
Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will Shaver</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/02/27/nhibernate-icriteria-count-and-the-missing-of-having-clause/comment-page-1/#comment-1610</link>
		<dc:creator>Will Shaver</dc:creator>
		<pubDate>Tue, 15 Jul 2008 23:26:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.nablasoft.com/Alkampfer/?p=152#comment-1610</guid>
		<description>Note that it now does have Having support.
http://jira.nhibernate.org/browse/NH-1280</description>
		<content:encoded><![CDATA[<p>Note that it now does have Having support.<br />
<a href="http://jira.nhibernate.org/browse/NH-1280" rel="nofollow">http://jira.nhibernate.org/browse/NH-1280</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

