I am using the latest version from SourceForge. I have not tried Trunk
yet.

I actually get an exception and not Zero results. The excpeption is
"NHibernate.MappingException: No persister for:
Common.Entity.EntityBase". I know it can't be a mapping issue because
the query will run if I remove the second Where.

On Aug 26, 11:59 pm, "[email protected]"
<[email protected]> wrote:
> Are you using the latest version of the trunk?  I've been using
> pagination /w the total counts for months without issue.  By fail, do
> you mean exception or do you mean "doesn't return the expected
> value"?
>
> I have seen some weird issues surrounding parent queries in the where
> clause.  I haven't filed the bug yet because it I have found the exact
> conditions.  It seems something like Session.Where(x => x.Parent ==
> null || x.Parent.SomeValue == null) seems to cause a weird inner where
> clause equality which leads to 0 being returned.
>
> On Aug 26, 11:29 pm, MichaelK <[email protected]> wrote:
>
> > I just upgraded to NH 3 Alpha. Some of my original unit tests failed
> > and this one bothers me as to why its failing.
>
> > This Fails
> > int result = Repository.Where(x => !x.IsDeleted).Where(x => x.Parent
> > == null).Count();
>
> > This Succeeds (calling ToList() before second where)
> > int result = Repository.Where(x => !x.IsDeleted).ToList().Where(x =>
> > x.Parent == null).Count();
>
> > also this Succeeds (proving it can't be a mapping issue)
> > int result = Repository.Where(x => !x.IsDeleted).Count()
>
> > The error I get is
> > No persister for: Common.Entity.EntityBase.
>
> > EntityBase is just an abstract class I inherit from that provides me
> > some common properties for all entities.
>
> > Any ideas ??

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to