From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 22:59:47
|
[ http://216.121.112.228/browse/NH-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-1953: ---------------------------- Issue Type: Improvement (was: Bug) > Future<> doesn't work on CreateFilter > ------------------------------------- > > Key: NH-1953 > URL: http://216.121.112.228/browse/NH-1953 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 2.1.0.GA > Reporter: Marko Podgorsek > > 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) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |