DummyPropertyInfo
I've just been looking at upgrading to the latest version of FNH, and have hit a problem. I'd previously been using my own DummyPropertyInfo class for mapping properties that didn't actually exist on my entities that a legacy database required. This worked pretty well using the Map() overload that takes a PropertyInfo. In the latest version this overload has gone but I see that there is now a FNH DummyPropertyInfo with extension method ToMember() that looks like it should do what I want, but when I use this I get the following exception:
Initialization method Domain.Test.DBCustomisationRepositoryTest.TestSetup threw exception. FluentNHibernate.Cfg.FluentConfigurationException: FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
---> FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
---> System.Runtime.Serialization.SerializationException: Type 'FluentNHibernate.DummyPropertyInfo' in Assembly 'FluentNHibernate, Version=1.1.0.685, Culture=neutral, PublicKeyToken=8aa435e3cb308880' is not marked as serializable.
Any idea how to get this to work?
Support Staff 2 Posted by James Gregory on 03 Aug, 2010 10:16 AM
Mark it as serializable? If that works, send us a pull request.
3 Posted by fluxmunki on 03 Aug, 2010 10:27 AM
I had a feeling that might be the answer... Not really set up for git or building from source at the moment. I'll see if I can find some time to do that.
Support Staff 4 Posted by Paul Batum on 07 Aug, 2010 11:51 AM
Given this is a one-liner and it makes sense, I've made the change in
my repository, it will be included in the next batch of changes I send
to James.