brianberns wrote:
Example: I have FooClass with attributes Attr1 and Attr2. I'd like to map FooClass.Attr1 to column Col1 in FooTable. No problem there. At the same time, I'd like to map FooClass.Attr2 to column Col2 in BarTable, which is a child of FooTable.
In short:
FooClass.Attr1 <=> FooTable.Col1
FooClass.Attr2 <=> BarTable.Col2
You can have a class and subclass so the properties can be mapped to different tables. Also you can have one-to-one relationship.
In fact your scenario is one-to-one because you have an attribute being mapped to the another table somehow. But to have
exactly your scenario is not possible in NH in my opinion.