jagregory/fluent-nhibernate — Issue #103: Example projects throw run time exceptions because of private setters on ID properties
Author: tbushell
Created: 2011-10-11 19:40:53+00:00
State: open

When you run either of the example projects, you get the following exception:

"The following types may not be used as proxies:\nExamples.FirstProject.Entities.Employee: method set_Id should be 'public/protected virtual' or 'protected internal virtual'\nExamples.FirstProject.Entities.Product: method set_Id should be 'public/protected virtual' or 'protected internal virtual'\nExamples.FirstProject.Entities.Store: method set_Id should be 'public/protected virtual' or 'protected internal virtual'"

The fix was to delete the "private" modifier for the ID property in all three entities.

Private setters used to work in FNH 1.0.