@Test
public void testPKOnlyUpdateByExampleSelective() {
SqlSession sqlSession = sqlSessionFactory.openSession();
try {
PkonlyMapper mapper = sqlSession.getMapper(PkonlyMapper.class);
PkonlyKey key = new PkonlyKey(1, 3);
mapper.insert(key);
key = new PkonlyKey(5, 6);
mapper.insert(key);
key = new PkonlyKey(7, 8);
mapper.insert(key);
PkonlyExample example = new PkonlyExample();
example.createCriteria().andIdGreaterThan(4);
key = new PkonlyKey(null, 3);
int rows = mapper.updateByExampleSelective(key, example);
assertEquals(2, rows);
example.clear();
example.createCriteria().andIdEqualTo(5).andSeqNumEqualTo(3);
rows = mapper.countByExample(example);
assertEquals(1, rows);
example.clear();
example.createCriteria().andIdEqualTo(7).andSeqNumEqualTo(3);
rows = mapper.countByExample(example);
assertEquals(1, rows);
} finally {
sqlSession.close();
}
}