Welcome Guest, Not a member yet? Register   Sign In
DMZ - Saving multi model relationships (help!!!)

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


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?

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.


Theme © iAndrew 2016 - Forum software by © MyBB