We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of j0k3r:
Url: #1327
Message:
Yaml & Xml mapping which define default value for a field aren't properly generated in the entity class by the EntityGenerator.
EntityGenerator
This is how the documentation says to define a default value in xml:
<field name="login_count" type="integer" nullable="false"> <options> <option name="default">0</option> </options> </field>
and in yml:
loginCount: type: integer column: login_count nullable: false options: default: 0
Both generates this field mapping (aka $fieldMapping):
$fieldMapping
array(5) { 'fieldName' => string(11) "login_count" 'type' => string(7) "integer" 'nullable' => bool(false) 'options' => array(1) { 'default' => string(1) "0" } 'columnName' => string(11) "login_count" }
But the EntityGenerator check the default value in the wrong place, in $fieldMapping['default'] instead of $fieldMapping['options']['default'].
$fieldMapping['default']
$fieldMapping['options']['default']
This is related to :
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1327] was labeled: #1327
A related Github Pull-Request [GH-1327] was assigned: #1327
A related Github Pull-Request [GH-1327] was closed: #1327
Issue was closed with resolution "Fixed"
Ocramius
No branches or pull requests
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of j0k3r:
Url: #1327
Message:
Yaml & Xml mapping which define default value for a field aren't properly generated in the entity class by the
EntityGenerator
.This is how the documentation says to define a default value in xml:
and in yml:
Both generates this field mapping (aka
$fieldMapping
):But the
EntityGenerator
check the default value in the wrong place, in$fieldMapping['default']
instead of$fieldMapping['options']['default']
.This is related to :
The text was updated successfully, but these errors were encountered: