Override Map() in SubclassMap<>

Original Post TigerShark's Avatar

TigerShark

07 May, 2010 01:38 PM via web

Is it possible to override a mapping in a subclass? For instance, I have a Map(x=>x.Name,"name") in my parent ClassMap<Client>.
I'd like to be able to control the map of the Name property in a subclass, to deny updates of that particular property.

Is that at all possible?

  1. Support Staff 2 Posted by James Gregory on 16 May, 2010 05:10 PM

    James Gregory's Avatar

    No, it isn't. NHibernate is pretty strict in that you either declare a property in the parent class or the child class, not both.

  2. James Gregory resolved this discussion on 16 May, 2010 05:10 PM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

05 Jul, 2010 10:29 PM
05 Jul, 2010 12:45 PM
05 Jul, 2010 12:42 PM
05 Jul, 2010 12:17 PM
05 Jul, 2010 12:12 PM

 

03 Jul, 2010 12:26 AM
02 Jul, 2010 02:17 PM
02 Jul, 2010 08:18 AM
02 Jul, 2010 12:20 AM
01 Jul, 2010 10:14 PM