public function offsetSet($key, $model)
{
if (isset($this->__relation->parent) and $this->__owner) {
// Set the parent of the model this the owner of the collection
$model->{$this->__relation->parent} = $this->__owner;
}
return parent::offsetSet($key, $model);
}