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