Is it possible that this isn't really inheritance at all, but just a series of (possibly one-to-one) associations? One reason I ask is that I notice B has both its own pk (PK_B) and a separate fk to A (PK_A). Even outside of Hibernate, whenever I've mapped a B as inheriting from A, I've ended up with a single column being both the pk of B and the fk to A -- that way, a single object id is used consistently across all the tables used to persist a single object. If you've built the schema with B having its own identity, maybe you're thinking of them as separate objects, even if you didn't think so. And if you map them as separate, associated objects, you have a lot more control over exactly what the schema looks like, without the constraints of inheritance. Just a thought.
And by the way, thanks for seeking to give me partial credit, but in the end it's no big deal, at least not to me. Used to be people helped each other on the boards without having to make it mercenary :-).
|