views:

33

answers:

2

I want to design following scenario

Base class (Id, Name, order, Value)

3 Derived classes derive1, derive2, derive3 inheriting properties from base

There is no table for base class. And 1 table for each derived class. 3 tables have same columns.

How can I create mapping file ignoring base class? Do I need to create 1 mapping file for each derived class? can I achieve this using only 1 mapping file?

A: 

You need 3 mapping files. Check out this reference:

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/inheritance.html#inheritance-tableperconcrete

Kevin Stafford
The same link from the NHibernate docs: http://www.nhforge.org/doc/nh/en/index.html#inheritance-tableperconcrete
Michael Maddox
A: 

Thanks Kevin and Michael..

Has anyone tried following in Nhibenate mapping file for repeating mapping properties?

"ENTITY allproperties SYSTEM "allproperties.xml" "

I did not find way to declare Doctype in Nhibernate mapping.

sukh
i tried and failed with NH2.1.1 and NH2.1.2, it seems its a broken feature
Jaguar