|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-30 18:59:42
|
[ http://216.121.112.228/browse/NH-2363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo resolved NH-2363.
-----------------------------
Resolution: Fixed
Fix Version/s: 3.2.0Beta2
> Patch for ComponentCollectionCriteriaInfoProvider, fixed persister.ElementType cast in constructor.
> ---------------------------------------------------------------------------------------------------
>
> Key: NH-2363
> URL: http://216.121.112.228/browse/NH-2363
> Project: NHibernate
> Issue Type: Patch
> Components: Core
> Affects Versions: 2.1.2.GA
> Reporter: Denis Bykov
> Priority: Minor
> Fix For: 3.2.0Beta2
>
> Attachments: nh_2.1.2_ComponentCollectionCriteriaInfoProvider.patch
>
>
> It's a patch for ComponentCollectionCriteriaInfoProvider (in NHibernate.Loader.Criteria).
> In 2.1.2 there is a cast in constructor of ComponentCollectionCriteriaInfoProvider:
> var componentType = (ComponentType)persister.ElementType;
> but in some cases type of persister.elementType can be CompositeCustomType, which is not descendant of ComponentType. For example, this situation occurs if we try to fetch items that have collection that meets specific condition, where a single element is of composite type and the former condition requires to test a value of a specific property of the composite type.
> Example with some implementation of Linq2Nhibernate:
> .Where(some => some.Keywords.Any(keyword => keyword.ID == someKeywordLink.ID))
> So, it's possible to change result type type to IAbstractComponentType from ComponentType.
--
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
|