In ORM you have 3 strategies
-TablePerClass
-TablePerClassHierarchy
-TablePerConcreteClass

with NH you have 4
-TablePerClass
-TablePerClassHierarchy
-TablePerConcreteClass
-TablePerClassHierarchy where some class can be split in another table
(mix TablePerClassHierarchy with TablePerClass starting
from TablePerClassHierarchy)

What you want is start from TablePerClass and end in TablePerClassHierarchy.

Probably if you can send us your classes and a little explication we may
help you to choose the right strategy.

btw you should ask yourself why you need to split part of the graph from B
on.

2010/2/23 Dzyann <[email protected]>

> Hi,
>
> I have been reading the documentation of NHibernate and I think that I
> am trying to accomplish is not possible, but i wanted to make sure
> here.
>
> Basically what i want is having:
> -Class A
> -Class B -> inherits A
> -Class B1 -> inherits B
> -Class B2 -> inherits B
> -Class B3 -> inherits B
>
> Map A in a Table, B in another Table, but B1, B2 and B3 in the same
> table than B.
>
> Reading in the documentation i found:
> "It is possible to use different mapping strategies for different
> branches of the same inheritance hierarchy, and then make use of
> implicit polymorphism to achieve polymorphism across the whole
> hierarchy. However, Hibernate does not support mixing <subclass>, and
> <joined-subclass> and <union-subclass> mappings under the same root
> <class> element. It is possible to mix together the table per
> hierarchy and table per subclass strategies, under the the same
> <class> element, by combining the <subclass> and <join>  elements (see
> below). "
>
> From what I can understand and I've researched, mapping the classes
> the way I need is not possible, but I would like someone to enlighten
> me if I am wrong :)
>
> Thanks in advance.-
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>


-- 
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.

Reply via email to