This code switch all collection mappings to Lazy, but still not workin with
ManyToOne
private static void ChangeAllRelationToLazy(Configuration
configuration) {
foreach ( var item in configuration.ClassMappings ) {
foreach ( var prop in item.PropertyIterator ) {
if ( prop.Value is NHibernate.Mapping.ManyToOne value )
{
value.IsLazy = true;
}
}
}
foreach ( var item in configuration.CollectionMappings ) {
item.IsLazy = true;
}
}
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nhusers/c13f30d7-60b4-4c2e-a1cc-08af27bc12d2%40googlegroups.com.