to make things clear, what this method does is to tell nhibernate that if the type of the collection implement is ISet (.Net set) or the type of the backing field implement ISet.. then is a SET.
The only other thing you have to do is to add the setfornet4 collection type factory to the configuration as follows: configuration.CollectionTypeFactory<Net4CollectionTypeFactory>(); 2011/7/13 José F. Romaniello <[email protected]> > I did it so like this; > > mapper.IsSet(IsSetFieldType); > > Then i have a method like this: > > private static bool IsSetFieldType(MemberInfo mi, bool declared) > { > var propertyTypeIsSet = mi.GetPropertyOrFieldType() > .GetGenericIntercafesTypeDefinitions() > .Contains(typeof(ISet<>)); > > if (propertyTypeIsSet) return true; > > var backFieldInfo = PropertyToField.GetBackFieldInfo((PropertyInfo)mi); > > return backFieldInfo != null > && backFieldInfo > > .FieldType.GetGenericIntercafesTypeDefinitions().Contains(typeof(ISet<>)); > } > > > It is part of another example appliccation here: > http://restbucks.codeplex.com/ > > And yes, the wiki sounds good. > -- 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.
