I hate to do this, but I gotta give this a bump. No one has any suggestions? :(
On Sep 21, 6:25 am, Jason <[EMAIL PROTECTED]> wrote: > I have an interesting issue with mymodelrelationships that I'm > attempting to figure out how to take care of in the most elegant > fashion. > > Basically, I have a Usermodel, a Profilemodel, and then multiple > extended Profile models (ex: AdminProfile, etc.) which have > information specific to that type of user. > > The user table has a "type" column which is an enum and designates > what type of user I have. > > My relationships are setup so that > > User HAS ONE Profile > Profile BLEONGS TO User > AdminProfile BELONGS TO Profile > XProfile BELONGS TO Profile > YProfile BELONGS TO Profile > > How can I get this extended profile information linked to my User or > Profile models on the fly? I know about bindModel and unbindModel, but > I'm not sure where best to use it. > > One thing I tried was modifying the afterFind() callback for User and > Profile to grab the user type and do an extra query for the extended > information. This feels dirty, however. It also breaks scaffolding > which is kind of annoying because I'm at the beginning stages of this > project. > > Any suggestions? I saw someone in another similar post mention a > factormodel. I am familiar with thefactorydesign pattern, however > I'm not familiar with how to implement it seamlessly within Cake. > > Any help would be greatly appreciated :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
