Skip to content

Commit

Permalink
Merge pull request #744 from jbruni/patch-1
Browse files Browse the repository at this point in the history
Corrected PHP type for "decimal" mapping type
  • Loading branch information
beberlei committed Aug 10, 2013
2 parents 5f5c0ff + 14bc65b commit 610e189
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Tools/EntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,9 @@ public function getEntityTypeAliasDataProvider()
)),
array(array(
'fieldName' => 'decimal',
'phpType' => 'float',
'phpType' => 'string',
'dbType' => 'decimal',
'value' => 33.33
'value' => '12.34'
),
));
}
Expand Down

0 comments on commit 610e189

Please sign in to comment.