Replace deprecated doctrine methods in lib directory

[MAILPOET-3889]
This commit is contained in:
Rostislav Wolny
2021-10-27 10:16:54 +02:00
committed by Veljko V
parent efde80b5c4
commit 73a9bed483
11 changed files with 35 additions and 35 deletions

View File

@@ -79,10 +79,10 @@ abstract class Repository {
public function truncate() {
$tableName = $this->classMetadata->getTableName();
$connection = $this->entityManager->getConnection();
$connection->query('SET FOREIGN_KEY_CHECKS=0');
$connection->executeQuery('SET FOREIGN_KEY_CHECKS=0');
$q = "TRUNCATE $tableName";
$connection->executeUpdate($q);
$connection->query('SET FOREIGN_KEY_CHECKS=1');
$connection->executeStatement($q);
$connection->executeQuery('SET FOREIGN_KEY_CHECKS=1');
}
/**