Hi guys,
I'm trying to have several {{InheritanceType}}s like this: {code}
@Entity(name=AbstractEntity.NAME) @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) public abstract class AbstractEntity { public static final String NAME = "abstract_entity"; }
@Entity(name = Product.NAME) @Table(name = Product.NAME) @Inheritance(strategy=InheritanceType.SINGLE_TABLE) public class Product extends AbstractEntity { public static final String NAME = "product"; }
@Entity(name = VariantProduct.NAME) public class VariantProduct extends AbstractEntity Product { public static final String NAME = "variant"; } {code}
but when I try to query the db like so: {code} from variant v; {code}
I get exception: {{"Cannot find table with name variant"}}. And I don't think it should be looking for table {{variant}} - the variant entities are stored in the product table.
|