Hi guys,
I'm trying to have several {{InheritanceType}}s like this:
@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 {
public static final String NAME = "variant";
}
but when I try to query the db like so:
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.
|