if i define property like this

private IDictionary<myKey, myEntity> myEntityMap;
public IEnumerable<myEntity>
{
  get { return _myEntityMap.Values.ToList();}
}

I will get an error like this

NHibernate.MappingException: Error mapping generic collection
SR.Domain.Client.Entities.Client.AccountTypeHistory: expected 2
generic parameters, but the property type has 1
   at NHibernate.Mapping.Collection.CheckGenericArgumentsLength(Int32
expectedLength)
   at NHibernate.Mapping.Map.get_DefaultCollectionType()
   at NHibernate.Mapping.Collection.get_CollectionType()
   at NHibernate.Mapping.Map.get_CollectionType()
   at NHibernate.Mapping.Collection.get_Type()

even though I said in the mapping that I said this

 <map name="myEntityMap" access="nosetter.camelcase-underscore">

Why is it looking at the property and not the backing field?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to