I have the following code:
criteria.SetProjection(Projections.ProjectionList()
.Add(Projections.Property("_personId")), "_ personId")
.Add(Projections.Property("_firstName"), "_firstName")
.Add(Projections.Property("_lastName"), "_lastName")
.Add(Projections.Property("_address"), "_ address ")
.SetResultTransformer(Transformers.AliasToBean(typeof(Person)));
I get the following error: NHibernate.QueryException: property does not map to a single column: _address
_address is a Person component in Nhibernate Mapping.
Can I use Projections.Property for a component?
source
share