Latest on twitter:
Oooooo I can’t wait until this is out RT @CrypticAlivet: This gave me chills: http://bit.ly/cyDtvI
Very cool and interesting, not sure it would actually take off though… it hasn’t got an “i” infront of the name :)
The last few photos were taken from a good friend’s site and personal collection.
Well I have run into this a few times in the past, however as always I forget what the error meant. I googled as usual and found a guy called Derik Whittaker describing exactly the same issue, however his fix was to do with the foreign key as well as the mapped object. Now my mappings didn’t have the duplicate foreign keys so I went off for a while trying to work out what the problem is. Then on closer inspection realised that two mapped items were using the same property, which in my case was UserID.
Removed the duplicate mapping and hey presto everthing is working again.
Using NHibernate I get this now and again and I always forget why. The reason is often because it doesn’t know that an item you have added should be auto saved, make sure you double check the unsaved-value attribute and that when your class has the correct default value, basically the same as your unsaved-value attribute.
Simple really but hopefully it will save someone some heartache by seeing this here.