views:

100

answers:

2

I need a generic Criterion which forces the result to zero matches.

Something like Restrictions.eq(true, false) ?

+1  A: 

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).

Stefan Steinegger
Thanks, you assumed right :)
codedevour