Thanks for the tip. I have it all set up following something similar to yours, only thing left is the Admin user. That's just a User with no Buyer / Seller so that User.association_key just sits empty I am assuming is correct since it has nothing associated with it.
Thanks again for all your help. Dave -----Original Message----- From: cricket [mailto:[email protected]] Sent: November-25-10 9:41 PM To: [email protected] Subject: Re: Table / Role / Profile Relations On Thu, Nov 25, 2010 at 2:25 PM, Dave Maharaj <[email protected]> wrote: > Sorry 1 last thing. > > Model in User, is it needed since in my setup User has role_id which would > be the same as model (in my case of role is Buyer User.model is also Buyer) > they would never be different. Each role has completely different > controllers / actions thru routing so knowing the Model to swap it out in > the code for ($this->User->{$model}-> would never be used since Buyer would > always be Buyer and Seller would always be Seller so in my example model > field would not really be needed if im following your example correct? The example I showed is similar to having roles, except that, when using roles, one would normally have a Role model and, thus, a roles table (which role_id points to, obviously). Doing it that way makes it simple to add new roles. But, if you're certain (or certain enough) that there won't be new roles added, doing it the way I suggested makes things much less complicated because each "role" model can then be given its own separate validation, control, behavior, etc. And there's no role_id. That's taken care of by the model/foreign_key. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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
