mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-28 01:30:11 -07:00
Disable SQLLogger
This commit is contained in:
parent
ac051df6a2
commit
69aaca9740
@ -52,6 +52,7 @@ abstract class BaseLoader
|
||||
$this->em = $em;
|
||||
$this->logger = $logger;
|
||||
$this->formatTransformer = new FormatTransformer();
|
||||
$this->em->getConnection()->getConfiguration()->setSQLLogger(null);
|
||||
}
|
||||
|
||||
public function setOutput(OutputInterface $output)
|
||||
|
@ -164,7 +164,6 @@ class ModelLoader extends BaseLoader
|
||||
|
||||
$index = 0;
|
||||
$connection = $this->em->getConnection();
|
||||
$connection->getConfiguration()->setSQLLogger(null);
|
||||
|
||||
foreach ($files as $file) {
|
||||
$this->progressBar->setMessage($file['basename']);
|
||||
|
@ -77,16 +77,19 @@ class RelationLoader extends BaseLoader
|
||||
private function loadPartRelation(Part $part)
|
||||
{
|
||||
$number = $part->getId();
|
||||
// Find model by id or alias
|
||||
$model = $this->modelRepository->findOneByNumber($number);
|
||||
if (!$model) {
|
||||
// Try to find relation from part_model.yml file
|
||||
$number = $this->relationMapper->find($this->getPrintedParentId($number), 'part_model');
|
||||
// Find model by id or alias
|
||||
$model = $this->modelRepository->findOneByNumber($number);
|
||||
|
||||
if (!$model) {
|
||||
// If model not found, try to find by identical model name
|
||||
$model = $this->modelRepository->findOneByName($part->getName());
|
||||
}
|
||||
}
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user