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

[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?


Messages In This Thread
DMZ - Saving multi model relationships (help!!!) - by El Forum - 09-23-2010, 05:14 AM
DMZ - Saving multi model relationships (help!!!) - by El Forum - 09-23-2010, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB