Thanks for your input. If I understand you correctly, you're
suggesting I have a creator_id column in my agencies table and another
creator_class column to indicate the type of creator. I guess then I
wouldn't be able to define creator_id as a foreign key. Am i getting
this correctly?

On Mar 4, 4:24 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> I would go using a creator_id and creator_class, then use one as the
> foreingKey and the other as a condition in the associations.
>
> On Tue, Mar 4, 2008 at 7:31 AM, chefsmart <[EMAIL PROTECTED]> wrote:
>
> >  Hi all,
>
> >  I just started out with cakePHP and am quite impressed by how much can
> >  be achieved in a short time.
>
> >  I'm stuck with a design issue and need some guidance. Please.
>
> >  Let's say I have two models: 1) Counsellor 2) Coordinator. There is a
> >  third model called Agency. An Agency can only be created by a
> >  Counsellor or a Coordinator. I need to store information in the
> >  database about each Agency's creator.
>
> >  Now if I call my database field agencies.createdby, how would I go
> >  about tying it up with cakePHP's convention? How would I go about
> >  determining whether the creator was a Counsellor or a Coordinator?
> >  Should I have two fields (coordinator_id, and counsellor_id) in the
> >  database in place of one createdby field?
>
> >  Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to