diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 5a55f0fc9..bab4c87f2 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -152,7 +152,7 @@ class EntityGenerator Type::SMALLINT => 'integer', Type::TEXT => 'string', Type::BLOB => 'string', - Type::DECIMAL => 'float', + Type::DECIMAL => 'string', Type::JSON_ARRAY => 'array', Type::SIMPLE_ARRAY => 'array', ); diff --git a/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php b/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php index d8dfa1b56..651424c22 100644 --- a/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php @@ -516,9 +516,9 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase )), array(array( 'fieldName' => 'decimal', - 'phpType' => 'float', + 'phpType' => 'string', 'dbType' => 'decimal', - 'value' => 33.33 + 'value' => '12.34' ), )); }