I'm trying to create Criteria as follow:
var criteria - session.CreateSQLQuery("select * from myTable where ID in (select id from tableB) AND ANOTHERID IN(select id from tableC)");
criteria.SetResultTransformer(Transformers.AliasToBean(typeof(myClass))).List<MyClass>().ToList()
And got the following exception:
Could not find a setter for property 'NAME' in class 'MYCLASS'
hbm property:
<property name="Name" type="string" column="NAME" not-null="true" update="true" insert="true"/>
.cs:
private string name;
public virtual string Name
{
get {return this.name;}
set { this.name=value;}
}
What I'm missing here?