inheritance « EntityManager « JPA Q&A





1. Declared metamodel attributes work fine BUT Inherited Metamodel Attributes are NULL. Why?    stackoverflow.com

I am not able to run the following test:-

@Test
public void test() {
    EntityManager em = entityManagerFactory.createEntityManager();
    em.getTransaction().begin();

    CriteriaBuilder builder = em.getCriteriaBuilder();
  ...

2. How does the JPA handle partial, non-disjoint inheritance (using InheritanceType.JOINED in class-per-table scenario) along with EntityManager.find()?    stackoverflow.com

I have a problem modeling/understanding partial, non-disjoint inheritance with JPA annotations. Here are the four tables:

CREATE TABLE Persons (
  id INTEGER NOT NULL,
  first_name VARCHAR(50) NOT NULL,
  last_name VARCHAR(50) ...