Package com.avaje.tests.inheritance.model

Examples of com.avaje.tests.inheritance.model.Configurations


    Assert.assertTrue(!results.isEmpty());
  }

  @Test
  public void testAssocMany() {
    Configurations configurations = new Configurations();
   
    EbeanServer server = Ebean.getServer(null);
   
    server.save(configurations);


    final GroupConfiguration gc = new GroupConfiguration("GC1");
    configurations.add(gc);
   
   
    server.save(gc);
   
   
    Configurations configurationsQueried = server.find(Configurations.class, configurations.getId());
   
    List<GroupConfiguration> groups = configurationsQueried.getGroupConfigurations();
   
    Assert.assertTrue(!groups.isEmpty());
  }
View Full Code Here


    Assert.assertTrue(!groups.isEmpty());
  }

  @Test
  public void testAssocManyWithNoneRelated() {
    Configurations configurations = new Configurations();
   
    EbeanServer server = Ebean.getServer(null);
   
    server.save(configurations);
   
    Configurations configurationsQueried = server.find(Configurations.class).fetch("groupConfigurations").where().idEq(configurations.getId()).findUnique();
   
    Assert.assertNotNull(configurationsQueried);
  }
View Full Code Here

TOP

Related Classes of com.avaje.tests.inheritance.model.Configurations

Copyright © 2018 www.massapicom. 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.