Skip to content

NH-1953 - Support Future for collection filters #722

@nhibernate-bot

Description

@nhibernate-bot

Marko Podgorsek created an issue — 2nd September 2009, 6:57:10:

Currently, Future<> doesn't work on CreateFilter

I have a class:

public class User
{
      public virtual IList<Tag> Tags { get; protected set; }
}

public class Tag .... //not important

Mapping for User -- the Tags part:

<bag lazy="true" name="Tags" table="USER_TAG">
      <key>
        <column name="ID_USER" />
      </key>
      <many-to-many class="BeriMe.Biz.Domain.Tag, BeriMe.Biz, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
        <column name="ID_TAG" />
      </many-to-many>
</bag>

If I do this:

User u = db.Get<User>(5);

var t = db.CreateFilter(u.Tags, "")
                .SetFirstResult(4)
                .SetMaxResults(3)
                .Future<Tag>();    //If I say List<Tag>() it works OK.

            foreach (var x in t) { } //crash

Error:
NHibernate.Hql.Ast.ANTLR.QuerySyntaxException: Exception of type 'Antlr.Runtime.MismatchedTreeNodeException' was thrown. [].

Error from log:
ERROR NHibernate.Hql.Parser - MismatchedTreeNodeException(3!=2)


Fabio Maulo added a comment — 2nd September 2009, 23:20:15:

I think that was never supported.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions