@@ 77-84 (lines=8) @@ | ||
74 | $qb->select('*')->from($this->getTable())->where($qb->expr()->eq('id', ':id'))->setParameter('id', $id); |
|
75 | ||
76 | $row = $qb->execute()->fetch(\PDO::FETCH_ASSOC); |
|
77 | if (false === $row) { |
|
78 | $this->logger->warning( |
|
79 | 'model: model {model} with id {id} not found', |
|
80 | ['model' => $modelClass, 'id' => $id] |
|
81 | ); |
|
82 | ||
83 | return null; |
|
84 | } |
|
85 | ||
86 | $this->cache->set($row['id'], $row); |
|
87 | ||
@@ 108-115 (lines=8) @@ | ||
105 | $qb = $this->getFindByQueryBuilder($criteria)->setMaxResults(1); |
|
106 | ||
107 | $row = $qb->execute()->fetch(\PDO::FETCH_ASSOC); |
|
108 | if (false === $row) { |
|
109 | $this->logger->warning( |
|
110 | 'model: model {model} with criteria {criteria} not found', |
|
111 | ['model' => $modelClass, 'criteria' => $criteria] |
|
112 | ); |
|
113 | ||
114 | return null; |
|
115 | } |
|
116 | ||
117 | $this->cache->set($row['id'], $row); |
|
118 |