Examples of InheritanceToOne


Examples of com.alvazan.test.db.InheritanceToOne

    sub2.setDescription("werew");
    sub2.setNum(78);
    sub2.setNumBalls(33);
    mgr.put(sub2);
   
    InheritanceToOne ent1 = new InheritanceToOne();
    ent1.setInheritance(sub1);
   
    InheritanceToOne ent2 = new InheritanceToOne();
    ent2.setInheritance(sub2);
   
    mgr.put(ent1);
    mgr.put(ent2);
   
    mgr.flush();
   
    InheritanceToOne result1 = mgr.find(InheritanceToOne.class, ent1.getId());
    Assert.assertTrue(result1.getInheritance() instanceof InheritanceSub1);
    Assert.assertEquals(sub1.getNum(), result1.getInheritance().getNum());
    InheritanceSub1 subResult1 = (InheritanceSub1) result1.getInheritance();
    Assert.assertEquals(sub1.getDiff(), subResult1.getDiff());
    Assert.assertEquals(sub1.getName(), subResult1.getName());
   
   
  }
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.