I have a class company, a class employee. Of course, one company employs more than one employee. Both classes store their data in a databse (table 'companies' and table 'employees').
Should I define $company->getAllEmployees() , or should I define another class 'employees' and there define a method 'fetchByCompany()'. Both could return an array with objects 'employee', while the latter solution would allow late-retrieval of the data in the database (only when going through the employees, we create the object employee).
any suggestions?