configurationnhibernate-envers

NHibernate Envers - HashedSet<T> throws NotImplementedException


When I am configuring Envers with my NHibernate configuration, some of my models have collections mapped as HashedSet<> and when I am calling configuration.IntegrateWithEnvers(auditConfiguration);

I get the exception telling me that I need to define a custom ICustomCollectionMapperFactory.

Where do I need to define that?


Solution

  • That's strange. I assume you are using nh envers 1.x and nh core 3.x? If so, (iesi) hashedset<> should work just fine. What's the error message you get?

    Anyhow - if you need to implement your own collectionmapperfactory (which you shouldnt need to, something else is fishy), you can have a look here... https://bitbucket.org/RogerKratz/nhibernate.envers.setfornet4 ...this example is used to be able to use (bcl) hashset<> as set implementation.

    If you use nh envers 2.0 (and nh 4), why don't you use (bcl) hashset<> instead?