From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-08 05:00:47
|
[ http://216.121.112.228/browse/NH-2627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2627. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0 > Cloning subcriteria loses WithClause > ------------------------------------ > > Key: NH-2627 > URL: http://216.121.112.228/browse/NH-2627 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0 > Reporter: Vitaliy Litovskiy > Fix For: 3.2.0 > > Attachments: subcriteria_clone_fix.patch > > > Method CloneSubcriteria in Subcriteria class doesn't clone the original WithClause. > steps to reproduce in pseudo code: > var criteria = DetachedCriteria.For<Model>(); > criteria.AddAlias("Collection", "item", JoinType.LeftOuterJoin, Restrictions.Eq("item.Property", "somve value")) > var cloneCriteria = CriteriaTransformer.Clone(criteria); > As a result criteria and cloneCriteria will return different results. This is cause by additional ON conditions for JOIN are lost in the SQL. > It seems that i've found how to fix the issue, but i haven't set up the development environment yet and cant build NHibernate solution and run tests. The possible patch is attached. -- 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 |