Ah the penny just dropped I think..
Was trying to populate a MonthlySetTargets class using:
Code:
<sql-query name="MonthlySetTargets_sp">
<return alias="targets" class="MonthlySetTargets">
<return-property name="MeasureTypeId" column="MeasureTypeId"/>
<return-property name="Code" column="Code"/>
<return-property name="TargetCount" column="TargetCount"/>
</return>
exec GetMonthlySetTargets :date, :locationId
</sql-query>
and kept getting No Persister for <class>.
I had not defined the class in a mapping file since I didn't want nhib to manage it. I didn't really grok what was occuring overall.
Dropped properties and set scalars.
Code:
<sql-query name="MonthlySetTargets_sp">
<return-scalar column="MeasureTypeId" type="Int32"/>
<return-scalar column="Code" type="String"/>
<return-scalar column="TargetCount" type="Int32"/>
exec GetMonthlySetTargets :date, :locationId
</sql-query>
Then using
Code:
SetResultTransformer(Transformers.AliasToBean(typeof(MonthlySetTargets )))
on the IQuery and everything is working now.