diff --git a/Cake/ORM/Table.php b/Cake/ORM/Table.php index d2fd13a5a30..616c2293abe 100644 --- a/Cake/ORM/Table.php +++ b/Cake/ORM/Table.php @@ -826,7 +826,7 @@ public function get($primaryKey, $options = []) { throw new RecordNotFoundException(__d( 'cake_dev', 'Record "%s" not found in table "%s"', implode(',', (array)$primaryKey), - $this->alias() + $this->table() )); } diff --git a/Cake/Test/TestCase/ORM/TableTest.php b/Cake/Test/TestCase/ORM/TableTest.php index 0122d00cd6d..1573e083ca0 100644 --- a/Cake/Test/TestCase/ORM/TableTest.php +++ b/Cake/Test/TestCase/ORM/TableTest.php @@ -3020,7 +3020,7 @@ public function testGetException() { ['callFinder', '_buildQuery'], [[ 'connection' => $this->connection, - 'alias' => 'articles', + 'table' => 'articles', 'schema' => [ 'id' => ['type' => 'integer'], 'bar' => ['type' => 'integer'],