In CakePHP I am trying to save data in a subdocument like this:
$mongo = $this->User->getDataSource();
$mongo->update($this->User, array(
array(
_id => $tweep[ User ][ _id ],
Services._id => $tweep[ User ][ Services ][ _id ]
),
array( Services.$.following => $following)
));
But obviously I am doing something wrong as it doesn t work.
$following is an array that I would like to save under Services whith a specific id.
This is the datasource method: https://github.com/ichikaway/cakephp-mongodb/blob/cake2.0/Model/Datasource/MongodbSource.php#L635