Examples of SuperParentWithSuperChild


Examples of com.google.appengine.datanucleus.test.jpa.UnidirectionalOneToOneSubclassesJPA.SuperParentWithSuperChild

    assertEquals(0, countForClass(parent.getClass()));
    assertEquals(0, countForClass(subChild.getClass()));
  }

  public void testWrongChildType() throws IllegalAccessException, InstantiationException {
    SuperParentWithSuperChild parent = new SuperParentWithSuperChild();
    parent.setSuperParentString("a string");
    // working around more runtime enhancer madness
    Object child = SubChild.class.newInstance();
    parent.setSuperParentSuperChild((SuperChild) child);

    beginTxn();
    em.persist(parent);
    try {
      commitTxn();
View Full Code Here

Examples of com.google.appengine.datanucleus.test.jpa.UnidirectionalOneToOneSubclassesJPA.SuperParentWithSuperChild

      // good
    }
  }

  public void testWrongChildType_Update() throws IllegalAccessException, InstantiationException {
    SuperParentWithSuperChild parent = new SuperParentWithSuperChild();
    parent.setSuperParentString("a string");
    beginTxn();
    em.persist(parent);
    commitTxn();
    beginTxn();
    parent = em.find(parent.getClass(), parent.getId());
    // working around more runtime enhancer madness
    Object child = SubChild.class.newInstance();
    parent.setSuperParentSuperChild((SuperChild) child);

    try {
      commitTxn();
      fail("expected exception");
    } catch (UnsupportedOperationException uoe) {
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.