Fixed
Details
Assignee
UnassignedUnassignedReporter
Sauli TähkäpääSauli TähkäpääComponents
Fix versions
Affects versions
Priority
TrivialWho's Looking?
Open Who's Looking?
Details
Details
Assignee
Unassigned
UnassignedReporter
Sauli Tähkäpää
Sauli TähkäpääComponents
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created February 10, 2012 at 8:58 PM
Updated September 21, 2014 at 12:42 PM
Resolved June 5, 2012 at 1:49 PM
A property with a collection type of for example -> public class MyCollection : PersistentGenericBag<MyEntity> can now be mapped using the Mapping By-Code.
Previously, mapping a non-generic custom collection class which inherits PersistentGenericBag<> or other generic NHibernate collection class, made the ModelMapper throw a NotSupportedException:
"Can't determine collection element relation (property MappedProperty in MyType)"
Root cause for this was the Type extension method DetermineCollectionElementType was not willing to find the element type of a collection type, if the collection type itself wasn't generic. (Even if it did inherit IEnumerable<>)