What I want to do (I think)...
In a distilled example form...
- class A defines field x
- class B defines field y, extends A, inheriting field x
- class C defines field z, extends A, inheriting field x
- I want class B to map to tbl_b which has columns x, y
- I want class C to map to tbl_c which has columns x, z
What I **don't** want to do (I think)...
- make a base table for class A that is joined to tbl_b and tbl_c
- map class B and class C to a single table that has a discriminator column
Questions...
1) Is there a conceptual problem with what I want to do?
2) Is there a way to do what I want to do? I've unsuccessully tried via annotations. Maybe via the XML mapping alternative to annotations? (I hope annotation and XML functionality is equivalent.)
Thanks for any input.