Hello,
I've got a problem using ICriteria. I get the error
Quote:
{"could not resolve property: ProgramId.TitleOriginal of: DemeterDomain.TMaterial"}
when trying to get data this way:
Code:
mCriteria.Add(Expression.Like("ProgramId.ProgramId", 1));
mCriteria.Add(Expression.Like("ProgramId.TitleOriginal", "zwo"));
tmpIList = mCriteria.List();
Using Criteria with only the first "ProgramId"-expression or using session.find works perfectly:
Code:
object b = session.Find("from TMaterial as TMaterial where TMaterial.ProgramId.TitleOriginal = 'zwo'");
My Mapping files look like this:
Code:
TMaterial.hmb.xml
<many-to-one name="ProgramId" column="PROGRAM_ID" class="TProgramDetails" />
TProgram.hbm.xml
<id name="ProgramId" column="PROGRAM_ID" type="Decimal" unsaved-value="0">
<generator class="assigned"/>
</id>
<property column="TITLE_ORIGINAL" type="String" name="TitleOriginal" length="250" />
Does anybody have an idea what I'm doing wrong?
Thank you for any advice...
Martin