[eluser]medvind[/eluser]
I am quite new to OOP and to the MVC way of thinking and I'm curious about one thing.
I have a model for each database table. There are cross-references in the tables, so that for instance order.customer_id points to customer.id.
When fetching all rows in a database table, for instance, 'order', and to fetch the associated information like the customer's name and address, it seems most efficient to do a detailed, joined database query to fetch all fields at once. However, I've gotten the impression that I should do everything with objects for it to be "real" OOP. So then I would have to make an array of order objects which in turn would create a customer object each to fetch all data. This seems to me like a huge waste of resources, but maybe there is a point to it?
Maybe I've misunderstood what should and what should not be done with objects?