#881 DDC-2825 - correcting PHP mapping behavior when using implicit schema in table name
This commit is contained in:
parent
0fd51cf852
commit
51bf82b7e7
@ -2246,6 +2246,11 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
public function setPrimaryTable(array $table)
|
public function setPrimaryTable(array $table)
|
||||||
{
|
{
|
||||||
if (isset($table['name'])) {
|
if (isset($table['name'])) {
|
||||||
|
// Split schema and table name from a table name like "myschema.mytable"
|
||||||
|
if (strpos($table['name'], '.') !== false) {
|
||||||
|
list($this->table['schema'], $table['name']) = explode('.', $table['name'], 2);
|
||||||
|
}
|
||||||
|
|
||||||
if ($table['name'][0] === '`') {
|
if ($table['name'][0] === '`') {
|
||||||
$table['name'] = trim($table['name'], '`');
|
$table['name'] = trim($table['name'], '`');
|
||||||
$this->table['quoted'] = true;
|
$this->table['quoted'] = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user