mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3878: [GH-1495] wrong or wrong created source results in wrong default variable assignment #4746
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Aug 25, 2015).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of echterhoff:
Url: https://github.com/doctrine/doctrine2/pull/1495
Message:
This is a bit tricky, since the problem occures only in rare circumstances.
I rely heavily on the "database reverse engineering" function in symphony. So during development we modell our database and deploy it to the database server (debian/madiadb). Then I do an automated ORM descriptor creation and a automated entity file creation provided by this tool. DB -> table.orm.yml -> table.php
A default integer (1) value, defined in the database becomes a: default: '1'
Than the EntityGenerator reads the default: '1' in quotes from the yaml-definition and var_dumps it into the .php entity. As a result the default value becomes a wrong type and doctrine tells me it can't use this default value.
As a workaround I extra type cast the value depending on the defined type.
Would like to see this problem solved in a futher version. Anyways, I am happy with the way these processes work.
@Ocramius commented on GitHub (Aug 23, 2018):
The YAML driver is deprecated and being removed: closing here as "won't fix"