DDC-3878: [GH-1495] wrong or wrong created source results in wrong default variable assignment #4746

Closed
opened 2026-01-22 14:48:40 +01:00 by admin · 1 comment
Owner

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.

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.
admin added the BugWon't Fix labels 2026-01-22 14:48:40 +01:00
admin closed this issue 2026-01-22 14:48:41 +01:00
Author
Owner

@Ocramius commented on GitHub (Aug 23, 2018):

The YAML driver is deprecated and being removed: closing here as "won't fix"

@Ocramius commented on GitHub (Aug 23, 2018): The YAML driver is deprecated and being removed: closing here as "won't fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4746