Examples of Master


Examples of test.po.Master

   *
   * @throws Exception
   */
  @Test
  public void testInsertWithOneRel() throws Exception {
    Master master = new Master();
    master.setId(5);
    pet.setName("xiaohei");
    pet.setAge(2);
    pet.setMaster(master);
    String[] fields = { "name", "age", "master" };
    String sql = insert.createByFields(fields)[0];
View Full Code Here

Examples of test.po.Master

    }
  }

  @Test
  public void testOneRel() throws Exception {
    Master master = new Master();
    master.setId(1);

    master.getPets().add(new Pet());
    master.getPets().add(new Pet());
    master.getPets().add(new Pet());

    //DAOFactory.getCascadeDAO().insert(master, "pets");
    Assert.assertEquals(true, true);
  }
View Full Code Here

Examples of test.po.Master

   *
   * @throws Exception
   */
  @Test
  public void testDeleteByOneRelField() throws Exception {
    Master master = new Master();
    master.setId(5);
    pet.setMaster(master);
    String[] fields = { "master" };
    String sql = delete.delete(fields)[0];
    Assert.assertEquals("DELETE FROM t_pet WHERE master_id = '5' ;", sql);
  }
View Full Code Here

Examples of test.po.Master

  public static void testOneUpdate() {
    Transaction.execute(new Trans() {
     
      @Override
      public void run(Object... args) throws Exception {
        Master master = new Master();
        master.setId(1L);
        DAOFactory.getCascadeDAO().update(master, "pets", 2);
        //throw new Exception();
      }
     
    });
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.