On Mon, Mar 16, 2009 at 4:47 PM, Svel <svel.so...@gmail.com> wrote: > > I have an "Object" which can be one of three types, and depending on > type, it has different fields. But logically it is just "Object". > So i have > 3 tables in my DB for each "Object" type > 1 table for types > > How i can create models / associations to implement this?
This is mainly an analysis/design problem instead of a CakePHP problem. I'm not sure, but maybe your "Object" could be a base model and make your other three types of your Object as subclasses of it. Or maybe, depending of your ER diagrams, you could implement this as an ordinary relationship, depending that's is a full or partial relationship (i.e., if is possible to have a Object of more than on type or even a raw Object with no specific type). Good luck. -- MARCELO DE F. ANDRADE (aka "eleKtron") Belem, PA, Amazonia, Brazil Linux User #221105 [...@parĂ¡ ~]# links http://pa.slackwarebrasil.org/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---