Skip to content

Commit

Permalink
fix entity class for irregular table names
Browse files Browse the repository at this point in the history
  • Loading branch information
segy committed Jun 18, 2018
1 parent 920aee3 commit a150b94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Table.php
Expand Up @@ -773,7 +773,7 @@ public function getEntityClass()
return $this->_entityClass = $default;
}

$alias = Inflector::singularize(substr(array_pop($parts), 0, -5));
$alias = Inflector::classify(Inflector::singularize(Inflector::underscore(substr(array_pop($parts), 0, -5))));
$name = implode('\\', array_slice($parts, 0, -1)) . '\\Entity\\' . $alias;
if (!class_exists($name)) {
return $this->_entityClass = $default;
Expand Down

0 comments on commit a150b94

Please sign in to comment.