<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://nhforge.org/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>NHibernate blog - All Comments</title><link>http://nhforge.org/blogs/nhibernate/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>re: QueryOver in NH 3.0</title><link>http://nhforge.org/blogs/nhibernate/archive/2009/12/17/queryover-in-nh-3-0.aspx#621</link><pubDate>Sat, 06 Mar 2010 23:25:58 GMT</pubDate><guid isPermaLink="false">45f813f2-f1c4-4eda-a619-288e3cadc793:621</guid><dc:creator>Richard Brown</dc:creator><description>&lt;p&gt;Hi SynC,&lt;/p&gt;
&lt;p&gt;1. &amp;nbsp;QueryOver is built on top of the ICriteria API, and I&amp;#39;m not sure you can do that projection in the ICriteria API (I could be wrong though);&lt;/p&gt;
&lt;p&gt;2. &amp;nbsp;Fabio suggested the same thing. &amp;nbsp;I tried projecting directly into anonymous types, something like:&lt;/p&gt;
&lt;p&gt;.Select(o =&amp;gt; new { o.Price, o.Count});&lt;/p&gt;
&lt;p&gt;I couldn&amp;#39;t get it to work; &amp;nbsp;I can&amp;#39;t remember the exact problem I had, but it was something to do with the parameters to the anonymous function. &amp;nbsp;Also, I&amp;#39;m not sure if the syntax would execute the query at this point, or still return an IQueryOver (to then call List(), or SingleOrDefault().)&lt;/p&gt;
&lt;p&gt;I might try again sometime when I&amp;#39;ve got some spare time.&lt;/p&gt;
&lt;p&gt;Oh, and patches are always welcome too. &amp;nbsp;;-)&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://nhforge.org/aggbug.aspx?PostID=621" width="1" height="1"&gt;</description></item><item><title>Soma best pharmacy online.</title><link>http://nhforge.org/blogs/nhibernate/archive/2009/03/20/nhibernate-poid-generators-revealed.aspx#620</link><pubDate>Sat, 06 Mar 2010 04:07:32 GMT</pubDate><guid isPermaLink="false">45f813f2-f1c4-4eda-a619-288e3cadc793:620</guid><dc:creator>Online soma sales.</dc:creator><description>&lt;p&gt;Buy soma online. Order soma online without prescription. Buy soma www scantips com buy soma online. Soma online. Soma online sales. Buy soma from mexico online.&lt;/p&gt;
&lt;img src="http://nhforge.org/aggbug.aspx?PostID=620" width="1" height="1"&gt;</description></item><item><title>Cyclobenzaprine buy prescription soma zanaflex.</title><link>http://nhforge.org/blogs/nhibernate/archive/2009/03/15/nhibernate-2-1-0-on-the-road.aspx#619</link><pubDate>Thu, 04 Mar 2010 17:26:02 GMT</pubDate><guid isPermaLink="false">45f813f2-f1c4-4eda-a619-288e3cadc793:619</guid><dc:creator>Buy soma online.</dc:creator><description>&lt;p&gt;Buy soma online order soma and get cheap soma. Buy cheap soma. Buy soma. Buy soma without prescription. Buy soma bloghoster. Http pills.viptemplates.com p buy soma. Cyclobenzaprine buy prescription soma zanaflex.&lt;/p&gt;
&lt;img src="http://nhforge.org/aggbug.aspx?PostID=619" width="1" height="1"&gt;</description></item><item><title>Social comments and analytics for this post</title><link>http://nhforge.org/blogs/nhibernate/archive/2010/02/25/db2hbm-convert-dbschema-to-hbm.aspx#618</link><pubDate>Tue, 02 Mar 2010 06:59:41 GMT</pubDate><guid isPermaLink="false">45f813f2-f1c4-4eda-a619-288e3cadc793:618</guid><dc:creator>uberVU - social comments</dc:creator><description>&lt;p&gt;This post was mentioned on Twitter by nhibernate: Blogged: Db2hbm: convert db schema to hbm: Here you can find a reverse engineering tool, and a documentation on ho... &lt;a rel="nofollow" target="_new" href="http://bit.ly/cuNIGR"&gt;http://bit.ly/cuNIGR&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://nhforge.org/aggbug.aspx?PostID=618" width="1" height="1"&gt;</description></item><item><title>re: QueryOver in NH 3.0</title><link>http://nhforge.org/blogs/nhibernate/archive/2009/12/17/queryover-in-nh-3-0.aspx#617</link><pubDate>Mon, 01 Mar 2010 16:43:02 GMT</pubDate><guid isPermaLink="false">45f813f2-f1c4-4eda-a619-288e3cadc793:617</guid><dc:creator>SynC</dc:creator><description>&lt;p&gt;Hi Richard, help please.&lt;/p&gt;
&lt;p&gt;1. Can be done something similar:&lt;/p&gt;
&lt;p&gt;session.QueryOver&amp;lt;Order&amp;gt;()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;.SelectList(list =&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list.Select(c =&amp;gt; c.Price * c.Count);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}); ?&lt;/p&gt;
&lt;p&gt;2. What about using anonymous types for projecting?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://nhforge.org/aggbug.aspx?PostID=617" width="1" height="1"&gt;</description></item><item><title>re: NHibernate Mapping - &lt;set/&gt;</title><link>http://nhforge.org/blogs/nhibernate/archive/2009/04/13/nhibernate-mapping-lt-set-gt.aspx#611</link><pubDate>Tue, 16 Feb 2010 14:07:17 GMT</pubDate><guid isPermaLink="false">45f813f2-f1c4-4eda-a619-288e3cadc793:611</guid><dc:creator>Stefan Steinegger</dc:creator><description>&lt;p&gt;Great Post!&lt;/p&gt;
&lt;p&gt;I wonder what happens with fetch=&amp;quot;subselect&amp;quot; if you had a very complex query before to load the entities (or a lot of queries, for instance from another N+1 situation). How will NH create the subquery? will batch-size be more efficient for such situations?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://nhforge.org/aggbug.aspx?PostID=611" width="1" height="1"&gt;</description></item><item><title>re: QueryOver in NH 3.0</title><link>http://nhforge.org/blogs/nhibernate/archive/2009/12/17/queryover-in-nh-3-0.aspx#610</link><pubDate>Fri, 12 Feb 2010 12:23:43 GMT</pubDate><guid isPermaLink="false">45f813f2-f1c4-4eda-a619-288e3cadc793:610</guid><dc:creator>Buthrakaur</dc:creator><description>&lt;p&gt;sorry for my blindness :)&lt;/p&gt;
&lt;p&gt;qry.Select(Projections.RowCount()).List&amp;lt;int&amp;gt;().FirstOrDefault()&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://nhforge.org/aggbug.aspx?PostID=610" width="1" height="1"&gt;</description></item><item><title>re: QueryOver in NH 3.0</title><link>http://nhforge.org/blogs/nhibernate/archive/2009/12/17/queryover-in-nh-3-0.aspx#609</link><pubDate>Fri, 12 Feb 2010 11:01:49 GMT</pubDate><guid isPermaLink="false">45f813f2-f1c4-4eda-a619-288e3cadc793:609</guid><dc:creator>Buthrakaur</dc:creator><description>&lt;p&gt;Is there any simple method how to set projections on QueryOver queries? I need to get count of entities returned by a QueryOver query and didn&amp;#39;t find other method than using underlying CriteriaAPI like this:&lt;/p&gt;
&lt;p&gt;			var qry = customerRepo.QueryOver()&lt;/p&gt;
&lt;p&gt;				.WhereRestrictionOn(c =&amp;gt; c.Name).IsInsensitiveLike(query.Name, MatchMode.Start)&lt;/p&gt;
&lt;p&gt;				.AndRestrictionOn(c =&amp;gt; c.Address.City).IsInsensitiveLike(query.City, MatchMode.Start);&lt;/p&gt;
&lt;p&gt;			var countCrit = (ICriteria)qry.UnderlyingCriteria.Clone();&lt;/p&gt;
&lt;p&gt;			countCrit.SetProjection(Projections.RowCount());&lt;/p&gt;
&lt;p&gt;			res.TotalItemsCount = Convert.ToInt32(countCrit.UniqueResult());&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://nhforge.org/aggbug.aspx?PostID=609" width="1" height="1"&gt;</description></item></channel></rss>