I think I might have fixed this problem. There were a couple of code error.
I just posted a patch to jira:
http://jira.nhibernate.org/browse/NH-762
Quote:
I tried to use them in my projects but kept getting a MappingException "No persister for XXXX". XXXX is the entity of my criteria.
I looked into the source and didn't found any unitest for AbstractEmptinessExpression.
NHibernate.MappingException: No persister for: WorkUnitBase
at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(String className, Boolean throwIfNotFound)
at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(String className)
at NHibernate.Expression.AbstractEmptinessExpression.GetQueryableCollection(String entityName, String actualPropertyName, ISessionFactoryImplementor factory)
at NHibernate.Expression.AbstractEmptinessExpression.ToSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery)
at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetWhereCondition()
at NHibernate.Loader.Criteria.CriteriaJoinWalker..ctor(IOuterJoinLoadable persister, CriteriaQueryTranslator translator, ISessionFactoryImplementor factory, CriteriaImpl criteria, Type rootEntityName, IDictionary enabledFilters)
at NHibernate.Loader.Criteria.CriteriaLoader..ctor(IOuterJoinLoadable persister, ISessionFactoryImplementor factory, CriteriaImpl rootCriteria, Type rootEntityName, IDictionary enabledFilters)
at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria, IList results)
at NHibernate.Impl.SessionImpl.Find[T](CriteriaImpl criteria)
at NHibernate.Impl.CriteriaImpl.List[T]()
at mmpire.Domain.Work.WorkUnitDAO.FindUnAssigned() in WorkUnitDAO.cs:line 43
at mmpire.Domain.Tests.Work.WorkUnitDAOsTests.FindUnAssignedTest() in WorkUnitDAOsTests.cs:line 193