Hi,
I've got some DAO and VO classes made for each of my tables, based on the principle that each and every table has it's own DAO and VO that only operate on that table. This seems to be the general advice I've picked up from various guides and seems logical enough so I'm happy so far...
However, I'm not quite sure how I should deal with table joins. For example, I may want to fetch all rows from a 'products' table, but want to join this table with a 'categories' table in order to tell what category each product belongs to. The ProductDAO and CategoryDAO classes have no idea how to interact with the other tables and likewise for the VOs. Should I create a new DAO and VO class especially for this table join? And if I wanted to join further tables, would I keep on making seperate, more complex DAO/VOs for each table combination?
Thanks