Package siena.base.test.model

Examples of siena.base.test.model.AggregateParentModel.update()


    adam2.save();
   
    assertEquals(adam1, god1.child.forceSync().get());
   
    god1.child.set(adam2);
    god1.update();

    AggregateParentModel god2 =
      Model.getByKey(AggregateParentModel.class, god1.id);
    assertNotNull(god2);
    assertEquals(adam2, god2.child.get());
View Full Code Here


    bob.name = "bobby";
    bob.save();
    eve.name = "evvy";
    eve.save();
   
    god.update();
   
    AggregateParentModel godbis = AggregateParentModel.all().filter("name", "goddy").get();
    assertEquals(god, godbis);
    List<AggregateChildModel> children = godbis.children.asList();
    assertEquals(adam2, children.get(0));
View Full Code Here

   
    assertNotNull(god.id);
    assertNotNull(god.child.get().id);
   
    god.children.asList().remove(eve);
    god.update();
   
    AggregateParentModel godbis = AggregateParentModel.all().filter("name", "god").get();
    assertEquals(god, godbis);
    List<AggregateChildModel> children = godbis.children.asList();
    assertEquals(adam2, children.get(0));
View Full Code Here

   
    assertNotNull(god.id);
    assertNotNull(god.child.get().id);
   
    god.children.asList().add(eve2);
    god.update();
   
    AggregateParentModel godbis = AggregateParentModel.all().filter("name", "god").get();
    assertEquals(god, godbis);
    List<AggregateChildModel> children = godbis.children.asList();
    assertEquals(adam2, children.get(0));
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.