DDC-1224 - Bugfix with temporary table ids and tables in schema (in postgresql)
This commit is contained in:
parent
a73a1e8437
commit
7efe071ac4
@ -1271,7 +1271,8 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
*/
|
||||
public function getTemporaryIdTableName()
|
||||
{
|
||||
return $this->table['name'] . '_id_tmp';
|
||||
// replace dots with underscores because PostgreSQL creates temporary tables in a special schema
|
||||
return str_replace('.', '_', $this->table['name'] . '_id_tmp');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -237,6 +237,17 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
$cm->mapField(array('fieldName' => 'name', 'columnName' => 'name'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DDC-1224
|
||||
*/
|
||||
public function testGetTemporaryTableNameSchema()
|
||||
{
|
||||
$cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');
|
||||
$cm->setTableName('foo.bar');
|
||||
|
||||
$this->assertEquals('foo_bar_id_tmp', $cm->getTemporaryIdTableName());
|
||||
}
|
||||
|
||||
public function testDefaultTableName()
|
||||
{
|
||||
$cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');
|
||||
|
Loading…
Reference in New Issue
Block a user