diff --git a/Classes/Service/SequenceGenerator.php b/Classes/Service/SequenceGenerator.php index 63cbde4..fd65201 100644 --- a/Classes/Service/SequenceGenerator.php +++ b/Classes/Service/SequenceGenerator.php @@ -1,6 +1,7 @@ entityManager; try { $em->getConnection()->insert( - 'digicomp_sequence_domain_model_insert', + $em->getClassMetadata(Insert::class)->getTableName(), ['number' => $count, 'type' => $type] ); return true; @@ -111,7 +112,7 @@ class SequenceGenerator $em = $this->entityManager; return $em->getConnection()->executeQuery( - 'SELECT MAX(number) AS count FROM digicomp_sequence_domain_model_insert WHERE type=:type', + 'SELECT MAX(number) AS count FROM ' . $em->getClassMetadata(Insert::class)->getTableName() . ' WHERE type=:type', ['type' => $this->inferTypeFromSource($type)] )->fetchAll()[0]['count']; }