I need to retrieve files with a status file = 10 and null values form a nullable VARCHAR2 column from an oracle db.
After some searching I found the following:
ICriteria criteria = NHibernateSession.CreateCriteria(persitentType);
criteria.Add(Expression.In("StatusFile", 10));
criteria.Add(Restrictions.IsEmpty("StatusFile"));
In sql would be something like:
select attstatus from table where file_tmode = 'P'and (status is null or status = 10);
If I remove the last line, it works, but I have not been able to find a way to add the criteria for the null values.
How could I do this?