protected function getInverseRelations($entity)
{
$query = $this->em->createQueryBuilder()->select('*')->from($this->mapping['target'])->where('to_id = :to_id')->andWhere('to_contenttype = :to_contenttype')->andWhere('from_contenttype = :from_contenttype')->setParameters(['to_id' => $entity->id, 'to_contenttype' => $entity->getContenttype(), 'from_contenttype' => $this->mapping['fieldname']]);
$result = $query->execute()->fetchAll();
return $result ?: [];
}