use of mbg.test.mb3.generated.conditional.model.PkonlyKey in project generator by mybatis.
the class ConditionalJava5Test method testPKOnlySelectByExampleNoCriteria.
@Test
public void testPKOnlySelectByExampleNoCriteria() {
PkonlyDAO dao = getPkonlyDAO();
try {
PkonlyKey key = new PkonlyKey();
key.setId(1);
key.setSeqNum(3);
dao.insert(key);
key = new PkonlyKey();
key.setId(5);
key.setSeqNum(6);
dao.insert(key);
key = new PkonlyKey();
key.setId(7);
key.setSeqNum(8);
dao.insert(key);
PkonlyExample example = new PkonlyExample();
example.createCriteria();
List<PkonlyKey> answer = dao.selectByExample(example);
assertEquals(3, answer.size());
} catch (SQLException e) {
fail(e.getMessage());
}
}
Aggregations