<?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: Quick Tip: NHibernate, &#8220;SQL not available,&#8221; and &#8220;cannot be used in this generic collection&#8221; error</title>
	<atom:link href="http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/</link>
	<description>Confessions of a small business software developer</description>
	<lastBuildDate>Sat, 04 Feb 2012 19:02:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: Phil</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1967</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Wed, 25 Jan 2012 15:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1967</guid>
		<description>Nice one, i figured ti was the .List just googled before i tried anything, cheers for the short cut to knowledge :D</description>
		<content:encoded><![CDATA[<p>Nice one, i figured ti was the .List just googled before i tried anything, cheers for the short cut to knowledge :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vitor Rubio</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1937</link>
		<dc:creator>Vitor Rubio</dc:creator>
		<pubDate>Tue, 27 Sep 2011 21:09:36 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1937</guid>
		<description>God bless you! You saved me, thanks, and congratulations.

Can i solve this trying to use List() instead of List(AType) and using generics objects? 

Nice blog :)</description>
		<content:encoded><![CDATA[<p>God bless you! You saved me, thanks, and congratulations.</p>
<p>Can i solve this trying to use List() instead of List(AType) and using generics objects? </p>
<p>Nice blog :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juliana Steven</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1910</link>
		<dc:creator>Juliana Steven</dc:creator>
		<pubDate>Tue, 26 Jul 2011 17:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1910</guid>
		<description>Thanks so much! I was struggling with this bit as a newbie. Wonderful explanation to to a very vague error</description>
		<content:encoded><![CDATA[<p>Thanks so much! I was struggling with this bit as a newbie. Wonderful explanation to to a very vague error</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pijush Dutta</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1869</link>
		<dc:creator>Pijush Dutta</dc:creator>
		<pubDate>Wed, 30 Mar 2011 10:51:17 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1869</guid>
		<description>Hi,

I am new bee in nhibernate. I have a simple entity called EmployeeEntity with properties (ID,Name,Age,Organisation,Designation). I am just querying the database using the query

IQuery query = session.CreateQuery(&quot;select Name ,Designation ,Age ,Organisation  FROM EmployeeEntity   group by  Name ,Designation ,Age ,Organisation&quot;);

Ilist employee= query.List(); //Throws error

but on convertion it to my type its throwing exception as &quot;ex = {&quot;Could not execute query[SQL: SQL not available]&quot;}&quot; on looking the inner message it says &quot;InnerException = {&quot;The value \&quot;System.Object[]\&quot; is not of type \&quot;NHibernateTest.EmployeeEntity\&quot; and cannot be used in this generic collection.\r\nParameter name: value&quot;}&quot;

though it works fine using with this query

IQuery query = session.CreateQuery(&quot;select e  FROM EmployeeEntity  e group by  e);

Ilist employee= query.List();

but I don&#039;t want to select all the columns because i don&#039;t need it.

Can anyone help regarding this.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am new bee in nhibernate. I have a simple entity called EmployeeEntity with properties (ID,Name,Age,Organisation,Designation). I am just querying the database using the query</p>
<p>IQuery query = session.CreateQuery(&#8220;select Name ,Designation ,Age ,Organisation  FROM EmployeeEntity   group by  Name ,Designation ,Age ,Organisation&#8221;);</p>
<p>Ilist employee= query.List(); //Throws error</p>
<p>but on convertion it to my type its throwing exception as &#8220;ex = {&#8220;Could not execute query[SQL: SQL not available]&#8220;}&#8221; on looking the inner message it says &#8220;InnerException = {&#8220;The value \&#8221;System.Object[]\&#8221; is not of type \&#8221;NHibernateTest.EmployeeEntity\&#8221; and cannot be used in this generic collection.\r\nParameter name: value&#8221;}&#8221;</p>
<p>though it works fine using with this query</p>
<p>IQuery query = session.CreateQuery(&#8220;select e  FROM EmployeeEntity  e group by  e);</p>
<p>Ilist employee= query.List();</p>
<p>but I don&#8217;t want to select all the columns because i don&#8217;t need it.</p>
<p>Can anyone help regarding this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusho</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1843</link>
		<dc:creator>Rusho</dc:creator>
		<pubDate>Wed, 02 Feb 2011 20:06:02 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1843</guid>
		<description>Really nice post boss! keep it up..</description>
		<content:encoded><![CDATA[<p>Really nice post boss! keep it up..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kan</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1825</link>
		<dc:creator>kan</dc:creator>
		<pubDate>Fri, 07 Jan 2011 09:07:48 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1825</guid>
		<description>ERROR
Could not execute query[SQL: SQL not available]
    
public IList listdataserviceplan(String custid)
        {
            using (ISession session = NHibernateHelper.OpenSession())
            {
                string query = &quot; select a.ServicePlanId as ServicePlanId ,a.ServiceDetail as ServiceDetail,&quot;
                    + &quot; a.DateServiceFix as DateServiceFix ,a.DateService as DateService,&quot;
                    + &quot; a.CaseNotSupport as CaseNotSupport ,a.ServiceChangeName as ServiceChangeName,&quot;
                    + &quot; a.DateServiceNew as DateServiceNew ,a.MaterialChange as MaterialChange,&quot;
                    + &quot; a.ServiceGuarantee as ServiceGuarantee ,a.ServiceMaintenance as ServiceMaintenance,&quot;
                    + &quot; a.ServiceCharge as ServiceCharge&quot;
                    + &quot; from BicIsu.Core.Domain.ServicePlan as a&quot;
                    + &quot; where 1=1&quot;
                    + &quot; and a.CustId = &#039;&quot; + custid + &quot;&#039; &quot;
                    + &quot; order by a.ServicePlanId&quot;;
                var cons = session.CreateQuery(query).List();
                return cons;
            }

        }</description>
		<content:encoded><![CDATA[<p>ERROR<br />
Could not execute query[SQL: SQL not available]</p>
<p>public IList listdataserviceplan(String custid)<br />
        {<br />
            using (ISession session = NHibernateHelper.OpenSession())<br />
            {<br />
                string query = &#8221; select a.ServicePlanId as ServicePlanId ,a.ServiceDetail as ServiceDetail,&#8221;<br />
                    + &#8221; a.DateServiceFix as DateServiceFix ,a.DateService as DateService,&#8221;<br />
                    + &#8221; a.CaseNotSupport as CaseNotSupport ,a.ServiceChangeName as ServiceChangeName,&#8221;<br />
                    + &#8221; a.DateServiceNew as DateServiceNew ,a.MaterialChange as MaterialChange,&#8221;<br />
                    + &#8221; a.ServiceGuarantee as ServiceGuarantee ,a.ServiceMaintenance as ServiceMaintenance,&#8221;<br />
                    + &#8221; a.ServiceCharge as ServiceCharge&#8221;<br />
                    + &#8221; from BicIsu.Core.Domain.ServicePlan as a&#8221;<br />
                    + &#8221; where 1=1&#8243;<br />
                    + &#8221; and a.CustId = &#8216;&#8221; + custid + &#8220;&#8216; &#8221;<br />
                    + &#8221; order by a.ServicePlanId&#8221;;<br />
                var cons = session.CreateQuery(query).List();<br />
                return cons;<br />
            }</p>
<p>        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sachin maharjan</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1751</link>
		<dc:creator>sachin maharjan</dc:creator>
		<pubDate>Fri, 16 Jul 2010 15:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1751</guid>
		<description>thanks helpme a lot.

on writing a query, i have to change something on my side but help me a lot.
string hql;
 
hql = @&quot;
	select
		A
	from Apple as A. Balls as B     
	where A.Id = B.AppleId  
	order by B.Id
&quot;;


thanks a lot</description>
		<content:encoded><![CDATA[<p>thanks helpme a lot.</p>
<p>on writing a query, i have to change something on my side but help me a lot.<br />
string hql;</p>
<p>hql = @&#8221;<br />
	select<br />
		A<br />
	from Apple as A. Balls as B<br />
	where A.Id = B.AppleId<br />
	order by B.Id<br />
&#8220;;</p>
<p>thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renzo</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1483</link>
		<dc:creator>Renzo</dc:creator>
		<pubDate>Thu, 19 Nov 2009 14:19:24 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1483</guid>
		<description>Thx for this i was struggling with the error aswell.</description>
		<content:encoded><![CDATA[<p>Thx for this i was struggling with the error aswell.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Diener</title>
		<link>http://nicholas.piasecki.name/blog/2009/10/nhibernate-sql-not-available-and-collection-error/comment-page-1/#comment-1410</link>
		<dc:creator>Sam Diener</dc:creator>
		<pubDate>Fri, 09 Oct 2009 21:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://nicholas.piasecki.name/blog/?p=375#comment-1410</guid>
		<description>What a great title for your blog.   I like the double entendre.  I am not by any means a coder though.  Good luck!</description>
		<content:encoded><![CDATA[<p>What a great title for your blog.   I like the double entendre.  I am not by any means a coder though.  Good luck!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

