2009/3/26 Peter Morris <[email protected]> > > This would work and is the kind of thing I would normally do, but in my > current ORM I can mark a property so that it can no longer be updated once > persisted so I can use this approach and still make Name immutible. In NH > I > am trying to make my classes completely persistence ignorant so I need an > OOP way to make Name immutible, which is why I wanted to go for the Name in > the constructor, although I suppose I could throw an exception if you try > to > set Name when it already has a value.
You can configure NH to use the field (including the backfield of an autoproperty) and don't have the setter. -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
