assertEquals(foreign.id, results.get(0).foreign.id);
/*
* Now let's try the same thing but with a SelectArg
*/
SelectArg selectArg = new SelectArg();
qb.where().eq(ForeignWrapper.FOREIGN_FIELD_NAME, selectArg);
selectArg.setValue(foreign.id);
results = wrapperDao.query(qb.prepare());
assertEquals(1, results.size());
assertNotNull(results.get(0).foreign);
assertEquals(foreign.id, results.get(0).foreign.id);
/*
* Now let's try the same thing but with a SelectArg with foreign value, not foreign.id
*/
selectArg = new SelectArg();
qb.where().eq(ForeignWrapper.FOREIGN_FIELD_NAME, selectArg);
selectArg.setValue(foreign);
results = wrapperDao.query(qb.prepare());
assertEquals(1, results.size());
assertNotNull(results.get(0).foreign);
assertEquals(foreign.id, results.get(0).foreign.id);
}