Package jodd.db.oom.tst

Examples of jodd.db.oom.tst.Boy2


    // prepare data

    assertEquals(1, DbEntitySql.insert(new Girl(1, "Anna", "swim")).query().executeUpdate());
    assertEquals(1, DbEntitySql.insert(new Girl(2, "Sandra", "piano")).query().executeUpdate());
    assertEquals(1, DbEntitySql.insert(new Boy2(1, "John", 1)).query().executeUpdate());

    // select without hint

    DbOomQuery dbOomQuery = new DbOomQuery(q1);

    Object[] result = dbOomQuery.find(Boy2.class, Girl.class);

    Boy2 boy2 = (Boy2) result[0];
    assertEquals(1, boy2.id);
    assertEquals("John", boy2.name);
    assertEquals(1, boy2.girlId);
    assertNull(boy2.girl);
View Full Code Here

TOP

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

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.