> Also although I now have: > > convention.AddTypeConvention(new MyEnumToIntConvention()); > > in my auto mapping configuration my "AlterMap" method is never called > for my enum types. > > I can see that the "FindConvetions" method in Conventions.cs line 80 > does return my custom convention but the AlterMap part is never > called. >
I guess the root cause is that the default EnumerationTypeConvention is ahead in the _propertyConventions List, so FindConventions will always return EnumerationTypeConvention instead of your own MyEnumToIntConvention. so if we make a change in: public void AddPropertyConvention(IPropertyConvention convention) { _propertyConventions.Insert(0, convention); } then, FindConventions will return the later added ITypeConvention, this will allow override of the default TypeConventions. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---