public function applyRelationships(Entity $owner, $data)
    {
        $this->validateData($data);
        $meta = $this->mf->getMetadataForType($owner->getType());
        foreach ($meta->getRelationships() as $key => $relationship) {
            if (!isset($data[$key]) || !$data[$key] instanceof EntityInterface) {
                continue;
            }
            $this->applyRelationship($owner, $key, $data[$key]);
        }
        return $this;
    }