DMZ - Saving multi model relationships (help!!!) |
[eluser]prestondocks[/eluser]
Hi All, I think I have my head around how multi model relationships work from reading the advanced relationships userguide, however it does not seem to tell you how to save the extra relationships. I have two models User and Task I can save a standard relationship with $t->save($u); but now have the need to save a relationship for a task_worker My relationship table now has the following fields ID user_id task_id task_worker_id user_worker_id I have updated the model to store the relationship as an array in the model (it will be a many to many relationship) Pleaes could someone tell me how to save this second relationship?
[eluser]prestondocks[/eluser]
I sorted out the problem myself. The solution can be found here (http://www.overzealous.com/dmz/pages/save.html) under the section saving advanced relationships. Hope this helps someone else. Thanks |
Welcome Guest, Not a member yet? Register Sign In |