I decided to do the following approach. If anyone has a better solution let me know. Thanks!
In my hibernate mappng file I created a new property..
Code:
<property name="DaysCheckedOut" formula="DateDiff(dd,CheckedOutOn,getdate())" />
Using the DetachedCriteria now yields a statement like..
Code:
detachedCriteria.Add(new NHibernate.Expression.GtExpression("DaysCheckedOut", 50));
The only problem with my approach is I really only need the DaysCheckedOut property when a user filters by this field. Since I made it a class property it will now always be part of the query when retrieving data. Not a huge performance penalty but I'd rather not always pull the field.
[/code]