I have this mapping file:
'class name="WebTools.Data.Common.IHObjekt, WebTools.Data" table="IHObjekt"'
....
'property name="TYPBEZEICH" type="string"'
...
'many-to-one name="standort" column="STANDORT_ID" fetch="join"'
And I would like to use a 'Projections.ProjectionList()' to reduce the number of returned columns from the query.
I do this:
'ICriteria criteria = Session.CreateCriteria(typeof(Data.Common.IHObjekt));'
'ProjectionList projectionList = Projections.ProjectionList();'
..
'projectionList.Add(Projections.Property("standort.CODE"));'
And receive this error:
NHibernate.QueryException: could not resolve property: standort.CODE of: WebTools.Data.Common.IHObjekt
I am trying to access a child entity but it appears I can only access the values in my parent class. Like:
'projectionList.Add(Projections.Property("TYPBEZEICH"));'
Can anyone provide some code that will let me use projection to access an entity in a child class?