@Test
public void testQueryIntoObjectID() throws Exception {

    PersonDefinition p = Person.PERSON;
    SqlBuilder builder = selectDistinct(p.PeopleID).from(p).orderBy(p.PeopleID.asc()).intoObject();
    List plist = dao.query(builder);
    assertEquals(4, plist.size());
    for(int i = 0; i < plist.size(); i++){
        assertEquals(i + 1, ((Number)plist.get(i)).intValue());
    }
}