Search code examples
.netnhibernatenhibernate-mapping

How to generate nosetter.camelcase-underscore access strategy with NHibernate mapping by code?


Cant find appropriate accessor. Should it be just NoSetter or Field? Thanks


Solution

  • If you have a (read-only) property, you should use Accessor.NoSetter

    The specific naming convention is determined automatically by NHibernate (of course, try not to have both _myProp, _MyProp and myProp fields, as NH will just pick the first one IIRC)