Hi Laptop Cake uses the active record model, so by convention, expects a one to one relationship between model and table. That said, it is possible for multiple models to share the same table by specifying the useTable attribute. If you're developing with 1.2, the actsAs could prove an alternative to multiple levels of inheritance. (i.e. OnlineAdvertisement actsAs Advertisement), although I must confess I have not use actsAs in anger yet...
For models that share mostly the same attributes, a few redundant columns in your table is a small price compared to the ease of maintenance and that niggling overhead of an extra join. From the information you've given, I'd probably treat the Online and/or Print as attributes of an Advertisement rather than seperate models. This is a bit like vi vs emacs - despite what many will tell you, there is no 'right way' from a pure design perspective - hence the multitude of ORM tools/projects out there. Just pick the simplest route first and refactor if it doesn't work out :) @gwoo: Are there any technical reasons why PrintAdvertisement cannot extend Advertisement? (i.e. framework complications rather that app complications). ~GreyCells On Apr 18, 4:46 am, gwoo <[EMAIL PROTECTED]> wrote: > no, they woudl still exend AppModel. > > OnlineAdvertisment belongsTo Advertisement > > I was thinking of it like User and Profile where the Advertisement is > like the User and the OnlineAdvertisment holds specifc details about > the Ad, like a Profile would. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---