Option # 1 Easy Way: SQL Query
Session.CreateSQLQuery("select * from YourEntityTable with (readpast) where SomeColumn = :col") .AddEntity(typeof(YourEntity)) .SetString("col", value) .UniqueResult<YourEntity>();
Option number 2 Requires additional work:
If you are not using one of NHibernate.LockMode, you can override the dialect of AppendLockHint () like this:
public override string AppendLockHint(LockMode lockMode, string tableName) { if (lockMode == <lockModeYouWantToSacrificeForThis>) { return tableName + " with (readpast)"; } return tableName; }
source share