Well, that's easy: the Measures class is not mapped!
Perhaps you can live without it by using the following trick:

session.GetNamedQuery("...").SetResultTransformer(NHibernate.Transform.Transformers.AliasToBean<Measure>()).List<Measure>();


In order to use this, however, the column names returned by the stored 
procedure must match the property names of the class.

RP


On Tuesday, May 21, 2013 7:48:03 PM UTC+1, andres falcon wrote:
>
> Which is the error?
>
> I see that you don´t have the definition for parameters, just the return 
> values.. Are you missing something?
> <query-param name="Location" type="string" />
>         <query-param name="StartDate" type="string" />
>         <query-param name="EndDate" type="string" />
>         <query-param name="RiskList" type="string" />
>
>
>
> El martes, 21 de mayo de 2013 04:22:34 UTC-3, Shravan Yadav escribió:
>>
>> I changed .hbm.xml to the following even that it not working
>>
>> <?xml version="1.0" encoding="utf-8" ?>
>> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true" 
>> assembly="MockTest"  namespace="MockTest.Models" >
>> <sql-query name="GetMeasures" callable ="true">
>>      <return class="MockTest.Models.Measures, MockTest">
>>       <return-property column="MemberID" name="MemberID" />
>>       <return-property column="Appointmentid" name="Appointmentid" />
>>       <return-property column="LastName" name="LastName" />
>>       <return-property column="FirstName" name="FirstName" />
>>       <return-property column="MiddleName" name="MiddleName" />
>>       <return-property column="ApptDateTime" name="ApptDateTime" />
>>       <return-property column="Service" name="Service" />
>>       <return-property column="ApptProviderID" name="ApptProviderID" />
>>       <return-property column="ApptProviderName" name="ApptProviderName" 
>> />
>>       <return-property column="ApptFacilityID" name="ApptFacilityID" />
>>       <return-property column="ApptFacilityName" name="ApptFacilityName" 
>> />
>>       <return-property column="PrimaryProviderID" 
>> name="PrimaryProviderID" />
>>       <return-property column="PrimaryProviderName" 
>> name="PrimaryProviderName" />
>>       <return-property column="PrimaryFacilityID" 
>> name="PrimaryFacilityID" />
>>       <return-property column="PrimaryFacilityName" 
>> name="PrimaryFacilityName" />
>>       <return-property column="MeasureData" name="MeasureData" />
>>     </return>
>>     exec dbo.spGetMeasureValues :DiseaseStateName, 
>> :Location,:Physicians,:StartDate,:EndDate, :RiskList
>>     </sql-query>
>> </hibernate-mapping>
>>
>>
>> On Tuesday, May 21, 2013 12:25:06 PM UTC+5:30, Ricardo Peres wrote:
>>>
>>> Yes, in NHibernate you always use : as the parameter prefix, regardless 
>>> of the actual database server.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to