Package jodd.db.oom.tst

Examples of jodd.db.oom.tst.Girl2


    assertTrue(iterator.hasNext());
    assertTrue(iterator.hasNext());
    assertTrue(iterator.hasNext());

    Girl2 girl1 = iterator.next();

    assertNotNull(girl1.getBoys());
    assertEquals(2, girl1.getBoys().size());

    assertTrue(iterator.hasNext());

    Girl2 girl3 = iterator.next();

    assertNotNull(girl3.getBoys());
    assertEquals(1, girl3.getBoys().size());

    assertFalse(iterator.hasNext());
  }
View Full Code Here


    Iterator<Girl2> iterator = q.withHints("g", "g.boys").entityAwareMode(true).iterate(Girl2.class, Boy.class);

    assertTrue(iterator.hasNext());

    Girl2 girl0 = iterator.next();
    assertNull(girl0.getBoys());

    Girl2 girl1 = iterator.next();

    assertNotNull(girl1.getBoys());
    assertEquals(2, girl1.getBoys().size());

    assertTrue(iterator.hasNext());

    Girl2 girl3 = iterator.next();

    assertNotNull(girl3.getBoys());
    assertEquals(1, girl3.getBoys().size());

    assertFalse(iterator.hasNext());
  }
View Full Code Here

  @Test
  public void testMapRows2Types_entityAware_Find() {
    DbOomQuery q = new DbOomQuery(sql(TSQL));

    Girl2 girl1 = q.withHints("g", "g.boys").entityAwareMode(true).find(Girl2.class, Boy.class);

    assertNotNull(girl1.getBoys());
    assertEquals(2, girl1.getBoys().size());
  }
View Full Code Here

  @Test
  public void testMapRows2Types_entityAware_Find_LEFT() {
    DbOomQuery q = new DbOomQuery(sql(TSQL_LEFT));

    Girl2 girl0 = q.withHints("g", "g.boys").entityAwareMode(true).find(Girl2.class, Boy.class);

    assertNull(girl0.getBoys());
  }
View Full Code Here

TOP

Related Classes of jodd.db.oom.tst.Girl2

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.