Friday, April 09, 2010

Can't write to a readonly object Source: NHibernate

This happens when you try to flush the default session with ReadOnlyCache objects. So in your ReadOnlyCached entity repository methods use:
using (new SessionScope(FlushAction.Never))
{
    entityRepository.FindAll();
}

No comments:

iPhone Launch Screen Sizes

iPhone Portrait iOS 8 Retina HT 5.5 = 1242 X 2208 Retna HD 4.7 = 750 X 1134 iPhone Landscape iOS 8 Retina HD 5.5  2208 X 1242 iPho...