The code (including the sql query)


DBSelect dbSelect = new DBSelect();
String query="select employee.*, address.* from employee left outer join address on
employee.address_id=address.id "
;
List<EmployeeDB> employeeList = dbSelect.getRecordsForCustomQuery(query, EmployeeDB.class, 0, 0,"employee.id");
for(EmployeeDB emp:employeeList)
emp.setAddress((AddressDB)emp.createChildObject(AddressDB.class));

The result


Name: Last name: Years employed: Address:
PeterMurphy12N/A
MarkPeters2London,Sackville 33
JeffreyMann5London,Vigo street 155
MarkBuckly9London,Turnmill 55
AliceWood5London,Whitecross street 23
<<   >>