Nhibernate ICriteria - Check property value length -


I am trying to return all the institutions where no given asset is not empty. The problem is that IsNotEmpty () applies only to the collection below is the general viewpoint till now, it does not clearly work.

  icteritia lvCriteria = NHibernateHelper.GetCurrentSession () .CreateCriteria (typeof (FunctionCall). SetsMaxResults (100) .AddOrder (Order.Desc ("LogId")); If (pvMsg.HasValue) {lvCriteria.Add (restriction.Ennotonal ("Message")). Add (restriction. ISNOTPT ("Message")); }  

Any suggestions? Is it possible to get this result by checking the length of the property's value? Thanks!

Finally, I found out that the combination was detected!

  lvCriteria.Add (no restriction. (Expression. Eq ("message", string.Empty)));  

This combination of restrictions and expressions works as expected; I do not know why I could not get these results before:

.apti)));

Thanks to all those people who try.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -