Does anyone know of a workaround within php-activerecord to allow object relationships to update via mass assignment?
Loaded object
$obj = Model::find(array(
'conditions'=>array('id=?', $id),
'include'=>array('Relationship_one', 'relationship_two')
));
the code
$obj->update_attributes(--post data--);
Will update object fine, but not its releationships.
Not much of an answer, but I've fixed this problem by making a function that is called with post data that
The advantage you have is that you can create these relationsships too! If a relationship doesn't exist (example: the first time you add something in a one to many relationship), you can update the 'base' model, but cannot update the association: you need to create one first. You can check for that in your models function, and then call the relation-model's function to finish the job.