I have a little issue and was wondering if someone can point me in the right direction or have a resolution for this issue.
I have never user Hibernate before and iam picking this work up from some other developer, i have other orm tools in the past.
I have a HQL Query which return me a list os studies. The studies table is joined to a contract and a test article tables.
I get this error on the last line of this code :
could not resolve property: Contract of: Bio.Domain.Model.TestArticle
Code:
if (req.bApplyFilter)
{
crit = crit.Add(Expression.Sql("{alias}.StudyManager = " + req.sFilter_StudyManager.ToString()));
crit = crit.Add(Expression.Eq("ProvisionalStartDate", req.sFilter_ProvisionalStartDate));
crit = crit.Add(Expression.Eq("ActualStartDate", req.sFilter_ActualStartDate));
crit = crit.Add(Expression.Eq("EndDate", req.sFilter_EndDate));
crit = crit.Add(Expression.Eq("FinalReportDate", req.sFilter_FinalReportDate));
crit = crit.CreateCriteria("TestArticle").Add(Expression.InsensitiveLike("ArticleName", req.sFilter_TestMaterialName, MatchMode.Anywhere));
crit = crit.CreateCriteria("Contract").Add(Expression.Sql("{alias}.ClientID = " + req.sFilter_SponsorNumber));
}
req.studies = (List<Study>)crit.List<Study>();
Any help with this issue would be superb.....cheers