Fix EntityType->empty_data=null#19732
Closed
pierre-H wants to merge 1 commit into
Closed
Conversation
Symfony 3.1, Doctine 2.5, PHP 7, SQL Server
With :
```
$builder
->add('users', EntityType::class, array(
'label' => 'Users',
'class' => 'AppBundle\Entity\Users',
'choice_label' => 'name',
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('u')
->orderBy('u.name', 'ASC');
},
'empty_data' => null,
'required' => false
))
```
I got an error :
SQLSTATE [42000, 8114]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Eror converting nvarchar datatype to numeric.
lemoinem
suggested changes
Sep 28, 2016
lemoinem
left a comment
Contributor
There was a problem hiding this comment.
Hi, Sorry, I've been too fast the first time.
Thank you for the contribution.
Could you add a test to make sure the bug doesn't reappears?
Plus, if you could include the whole PR template please, each part is important. If you think one is not relevant for your PR, please leave it empty or fill it with N/A instead of removing the line entirely.
Thank you!
Contributor
|
This fix is wrong. If |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symfony 3.1, Doctine 2.5, PHP 7, SQL Server
With :
I got an error :
SQLSTATE [42000, 8114]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Eror converting nvarchar datatype to numeric.