Hello,
I'm trying to use createCriteria API on <component> property.
I made several tests :
My component is ValidityPeriod and it contains the End Property.
Code:
ICriteria crit=NHibernateSession.CreateCriteria(typeof(DomainModel.MainObject));
crit.Add(Expression.Gt("ValidityPeriod.End",beginDate));
Then, it returns the error code :
Quote:
could not resolve property:ValidityPeriod.End
Using the typical way for association :
Code:
crit.CreateCriteria("ValidityPeriod").Add(Expression.Gt("End",beginDate));
it returns :
Quote:
not an association path: ValidityPeriod)
IS there a way to use createCriteria for Component?
or must I use HQL query or session.find ?
Thanks,
David