I have two classes A, B.
Code:
public class A{
}
public class B extends A{
A a[]; // has array of A's
}
// other classes C, D etc also extend A
The classes were written long time ago, and I can't change them.
Can anybody give some suggestions on how this can be mapped using Hibernate. I am using table per hierarchy strategy to map these classes.
To map B, I am currently thinking I will use table per hierarchy mixed with "table for class B". But this requires a many-to-one from B to A,whereas my requirement is the other way round.
Thanks in advance for any help.