“Invalid Index n for this SqlParameterCollection with Count=n” OR “foreign key cannot be null”
问题 I have been successfully using NHibernate for quite some time now and have been able to solve a lot of pitfalls with an application that I developed with it and that is running in production. The recent hurdle really has me scratching my head, though. Recently I had to expand the class library with some new classes that are nested as children to some already existing classes. I just copied the same model for aggregate mapping that I already was successfully using, but this time it does not