I have three tables: Contact, Category, and Categories. The table Category contains details of what type of contact a Contact row is, and a Contact can have many Categories (could, say, be a supplier and a customer), and similarly there could be many Contacts who belong to the same Category, so as is usual in such cases, I split the many-many out into a separate table, ContactCategories.
Assuming I want a user to be able to create a Contact and assign categories, how should I go about it? In fact I think I’ve actually got that solved (maybe incorrectly), but what about editing that contact (particularly when the assigned categories change)?
At the moment when Contact->actionUpdate is called and the model is loaded, the resulting form doesn’t have any content. I suspect, from doing a var_dump that the model isn’t including the data from the related tables. Where have I gone wrong?