public function updateOwners()
    {
        foreach ($this->attributes as $attr) {
            Mediafile::removeOwner($this->owner->primaryKey, $this->name, $attr);

            if ($mediafile = $this->loadModel($this->owner->$attr)) {
                $mediafile->addOwner($this->owner->primaryKey, $this->name, $attr);
            }
        }
    }