public function save($entity)
    {
        if ($this->idProperty->getValue($entity) === null) {
            return $this->insert($entity);
        } else {
            return $this->update($entity);
        }

    }