Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Eclipselink mapping question


I have the following problem:

I defined a BaseEntity for all my Entity classes. This BaseEntity class contains only the id.
In this way I don't need to define id variables in every Entity class.

I have a CatalogProduct class which extends the BaseEntity class.
But when I run the query for an entity, for example: em.createQuery("select p from CatalogProduct p").getResultList(), it always tries to select from the BaseEntity table which doesn't exist.

What is causing the problem?

public abstract class BaseEntity {
   private long id;

   public long getId() {
       return id;


@Table(schema="PLI", name = "PLI_CATALOG_PRODUCTS")
public abstract class CatalogProduct extends BaseEntity{


Back to the top