Hello all, I have the following question. I have a generic content model from which many content types inherit. The inheritance strategy defined through annotations is JOINED inheritance. The thing is, not all the subtypes have extra properties, but hibernate still generates extra tables, here's a sample:
Code:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public class Content {
int id;
String text;
(etc, etc, and a bunch of getters and setters)
}
@Entity
public class ExtendedContent extends Content {
int otherProperty;
(getter and setter)
}
@Entity
public class Comment extends Content {}
So with these 3 entities I get 3 tables, one for the base class, one for the ExtendedContent, and one for Comment. But the table comment (as expected I guess) only contains one column, which is a foreign key reference to the base table. So I think this is kind of redundant, any way to explicitly tell hibernate not to generate an extra table for Comment?