1
0
mirror of synced 2025-01-18 22:41:43 +03:00

[2.0][DDC-88] Quoted field name in decimal model as a little test for identifier quoting.

This commit is contained in:
romanb 2009-11-01 11:04:03 +00:00
parent e2962c73dc
commit 44045a6b83
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ class DecimalModel
*/
public $id;
/**
* @Column(type="decimal", scale=2, precision=5)
* @Column(name="`decimal`", type="decimal", scale=5, precision=2)
*/
public $decimal;
}

View File

@ -47,7 +47,7 @@ class MySqlSchemaToolTest extends \Doctrine\Tests\OrmFunctionalTestCase
$sql = $tool->getCreateSchemaSql($classes);
$this->assertEquals(1, count($sql));
$this->assertEquals("CREATE TABLE decimal_model (id INT AUTO_INCREMENT NOT NULL, decimal NUMERIC(5, 2) NOT NULL, PRIMARY KEY(id)) ENGINE = InnoDB", $sql[0]);
$this->assertEquals("CREATE TABLE decimal_model (id INT AUTO_INCREMENT NOT NULL, `decimal` NUMERIC(2, 5) NOT NULL, PRIMARY KEY(id)) ENGINE = InnoDB", $sql[0]);
}
public function testGetCreateSchemaSql3()