From 12ab03bd7a0e1b88fdd5ff7fb0aea16c47116046 Mon Sep 17 00:00:00 2001 From: Tomas Saghy Date: Tue, 8 May 2018 11:18:50 +0200 Subject: [PATCH] Update TableLocator.php --- src/ORM/Locator/TableLocator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ORM/Locator/TableLocator.php b/src/ORM/Locator/TableLocator.php index 27b907b0959..95b2ce8345c 100644 --- a/src/ORM/Locator/TableLocator.php +++ b/src/ORM/Locator/TableLocator.php @@ -195,7 +195,9 @@ public function get($alias, array $options = []) if ($className) { $options['className'] = $className; } else { - $options['className'] = Inflector::camelize($alias); + if (empty($options['className'])) { + $options['className'] = Inflector::camelize($alias); + } if (!isset($options['table']) && strpos($options['className'], '\\') === false) { list(, $table) = pluginSplit($options['className']); $options['table'] = Inflector::underscore($table);