In an EJB 3 entities beans scenario, I have an abstract entity class that's extended by my beans. The problem is that, even though I specify the table names in the extending classes, in the named queries the references are always substituted by the super (abstract) class name. For example:
public class AbstractEntity
@NamedQuery(name="MyClass.getAll", query="SELECT c FROM MyClass c")
public class MyClass extends AbstractEntity
When the named query query is executed, instead if translating the table name to "MyClass", it translates to "AbstractEntity"... What am I doing wrong?