record.setLastname("Rubble");
record.setId1(2);
record.setId2(3);
mapper.insert(record);
MyObjectCriteria example = new MyObjectCriteria();
fn = new FirstName();
fn.setValue("B%");
example.createCriteria().andFirstnameLike(fn).andId2EqualTo(3);
fn = new FirstName();
fn.setValue("W%");
example.or(example.createCriteria().andFirstnameLike(fn));
example.setOrderByClause("ID1, ID2");
List<MyObject> answer = mapper.selectByExample(example);
assertEquals(2, answer.size());
MyObject returnedRecord = answer.get(0);
assertEquals(1, returnedRecord.getId1().intValue());
assertEquals(2, returnedRecord.getId2().intValue());