Hello, I'm trying to return all entities where a given property is not empty. The problem is IsNotEmpty() only applies to collections. Below is the general approach I've taken so far, it obviously doesn't work.
ICriteria lvCriteria = NHibernateHelper.GetCurrentSession()
.CreateCriteria(typeof(FunctionCall))
.SetMaxResults(100)
.AddOrder(Order.Desc("LogId"));
if (pvMsg.HasValue)
{
lvCriteria.Add(Restrictions.IsNotNull("Msg"))
.Add(Restrictions.IsNotEmpty("Msg"));
}
Any suggestions? Is it possible to achieve this result by checking the property value's length? Thank you!