I need a generic Criterion which forces the result to zero matches.
Something like Restrictions.eq(true, false) ?
I need a generic Criterion which forces the result to zero matches.
Something like Restrictions.eq(true, false) ?
I use
Restrictions.Sql("(1=0)");
:-)
(Using NHibernate in C#, assuming you are using Hibernate and Java, so I hope I used the correct names of the API).