Hello all,
I can't find what's going on with the following nHibernate HQL.
here's my VB.Net code:
Code:
Return _Session.GetNamedQuery("PersonAnthroSummary").SetInt32(0, 2).UniqueResult()
My Named Query:
Code:
<query name="PersonAnthroSummary">
select new PersonAnthroSummary( Anthro.Height, Anthro.Weight ) from PersonAnthroContact as Anthro where Anthro.ID = ?
</query>
and i am importing the DTO class:
Code:
<import class="xxxxxxx.DataServices.PersonAnthroSummary, xxxxxxx.DataServices"/>
PersonAnthroSummary has a constructor that will take height and weight arguments.
when i test this, nHibernate throwing following exception:
Quote:
"Errors in named queries: {PersonAnthroSummary}"
and generated QueryString is:
Code:
"select New PersonAnthroSummary( Anthro.Height, Anthro.Weight ) from PersonAnthroContact as Anthro where Anthro.ID = @p0"
Can some one tell me what i'm doing wrong here?.