diff --git a/LeanMapper/Repository.php b/LeanMapper/Repository.php
index <HASH>..<HASH> 100644
--- a/LeanMapper/Repository.php
+++ b/LeanMapper/Repository.php
@@ -268,12 +268,7 @@ abstract class Repository
 					return $this->entityClass = $entityClass;
 				}
 			}
-			$entityClass = $this->mapper->getEntityClass($this->mapper->getTableByRepositoryClass(get_called_class()), $row);
-			if ($row === null) { // this allows small performance optimalization (TODO: note in documentation)
-				$this->entityClass = $entityClass;
-			} else {
-				return $entityClass;
-			}
+			return $this->mapper->getEntityClass($this->mapper->getTableByRepositoryClass(get_called_class()), $row);
 		}
 		return $this->entityClass;
 	}
Fixed cache-related issue in Repository