Examples of FetchB


Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

  public void createData() {
    OpenJPAEntityManager em = emf.createEntityManager();
    em.getTransaction().begin();
    FetchA a1 = new FetchA();
    a1.setText("a1");
    FetchB b1 = new FetchB();
    b1.setText("b1");
    a1.setB(b1);
    em.persist(a1);
    em.persist(b1);
    em.getTransaction().commit();
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

    fp.addField(FetchB.class, "text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
    em.close();

    FetchB  b = a.getB();
    assertNotNull(b);
    assertNull(a.getText());
    assertEquals("b1", b.getText());
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

    fp.addField(FetchA.class, "text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
    em.close();

    FetchB  b = a.getB();
    assertNotNull(b);
    assertEquals("a1", a.getText());
    assertNull(b.getText());
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

    fp.addField(FetchBase.class, "text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
    em.close();

    FetchB  b = a.getB();
    assertNotNull(b);
    assertEquals("a1", a.getText());
    assertEquals("b1", b.getText());
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

    fp.addField(FetchB.class.getName() + ".text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
    em.close();

    FetchB  b = a.getB();
    assertNotNull(b);
    assertNull(a.getText());
    assertEquals("b1", b.getText());
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

    fp.addField(FetchA.class.getName() + ".text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
    em.close();

    FetchB  b = a.getB();
    assertNotNull(b);
    assertEquals("a1", a.getText());
    assertNull(b.getText());
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

    fp.addField(FetchBase.class.getName() + ".text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
    em.close();

    FetchB  b = a.getB();
    assertNotNull(b);
    assertEquals("a1", a.getText());
    assertEquals("b1", b.getText());
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

  public void createData() {
    OpenJPAEntityManager em = emf.createEntityManager();
    em.getTransaction().begin();
    FetchA a1 = new FetchA();
    a1.setText("a1");
    FetchB b1 = new FetchB();
    b1.setText("b1");
    a1.setB(b1);
    em.persist(a1);
    em.persist(b1);
    em.getTransaction().commit();
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

    fp.addField(FetchB.class, "text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
    em.close();

    FetchB  b = a.getB();
    assertNotNull(b);
    assertNull(a.getText());
    assertEquals("b1", b.getText());
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchB

    fp.addField(FetchA.class, "text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
    em.close();

    FetchB  b = a.getB();
    assertNotNull(b);
    assertEquals("a1", a.getText());
    assertNull(b.getText());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.