Investors
- id
...

Posts
- id
- investor_id (mandatory)
- employee_id (optional)
...

Employees
- id
- investor_id (mandatory)
...

That's all, no post_id in employees! The belongsTo definition in the
Post model, does not require a foreign key in the Employee model! :)
The Investor / Post relationship is a master / detail relationship.
The same goes for the Employee / Post relationship, except that it is
not mandatory!
   John

On Jun 11, 5:03 pm, "Dave Maharaj :: WidePixels.com"
<[email protected]> wrote:
> Right.
>
> Thanks for that.
>
> So to make this work with the relations you out lined below if I add
> employee_id to the posts table , creates employees tables with investor_id
> post_id that should do it for db changes? Add the employees controller/model
> and add the relationshis to the other models Investor / Posts.
>
> Thanks again.
>
> Dave
[snip]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to