Merge branch 'DDC-1224'
This commit is contained in:
commit
ca0bea1d8a
2 changed files with 13 additions and 1 deletions
|
@ -1271,7 +1271,8 @@ class ClassMetadataInfo implements ClassMetadata
|
||||||
*/
|
*/
|
||||||
public function getTemporaryIdTableName()
|
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');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -236,6 +236,17 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||||
$this->setExpectedException('Doctrine\ORM\Mapping\MappingException');
|
$this->setExpectedException('Doctrine\ORM\Mapping\MappingException');
|
||||||
$cm->mapField(array('fieldName' => 'name', 'columnName' => 'name'));
|
$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()
|
public function testDefaultTableName()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue