softlogger wrote:
In my mapping file (<>.hbm.xml) if I use the class name as "IClient" then Session.Save(aClient) chokes because it expects an object of type IClient while aClient is of type "Client".
To avoid this, if in my mapping file I use the class name as "Client" then the object constructed and returned by Session.Get<IClient>(ClientId) chokes because it only knows how to construct "Client".
So my question is this - in the nhibernate way of the world, is it possible to have a class implement an Interface and that Class/Interface is implemented as a single table in the db?
Ist should be popssible to implemet this with sub-class mapping.
I.e. You map IClient as class and Client as subclass.
Gert