-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
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
Fix Hidden fields triggering error when using getSingleScalarResult() #8340
Fix Hidden fields triggering error when using getSingleScalarResult() #8340
Conversation
Fixes doctrine#4257 HIDDEN fields was causing the "unicity" check to fail (NonUniqueResultException), because we was counting raw data instead of gathered row data.
I didn't add "use function" statements because there was none in the original file, but I see errors in the commit. |
@Mediagone i don't understand what you mean with HIDDEN fields? This behavior here is the same that DBAL and by extension PDO have when you use If we want this to change, it would be a BC break. |
Hi @beberlei , let's take this example:
In this case, |
tests/Doctrine/Tests/ORM/Hydration/SingleScalarHydratorTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/Tests/ORM/Hydration/SingleScalarHydratorTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/Tests/ORM/Hydration/SingleScalarHydratorTest.php
Outdated
Show resolved
Hide resolved
Tests updated 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see another reviewer checking the changes and if the tests are sufficient.
thank you |
…doctrine#8340) * Fix Hidden fields triggering error when using getSingleScalarResult() Fixes doctrine#4257 HIDDEN fields was causing the "unicity" check to fail (NonUniqueResultException), because we was counting raw data instead of gathered row data. * Fix Coding Standards (7.4) * Fix Coding Standards (7.4) #2 * Fix Coding Standards (7.4) - Fix whitespaces * Fix Coding Standards (7.4) - Fix whitespaces in tests * Fix Coding Standards (7.4) - Fix more things * Refactor tests into separate methods * Fix Coding Standards (7.4) - Equals sign not aligned with surrounding assignments
…#8340) * Fix Hidden fields triggering error when using getSingleScalarResult() Fixes #4257 HIDDEN fields was causing the "unicity" check to fail (NonUniqueResultException), because we was counting raw data instead of gathered row data. * Fix Coding Standards (7.4) * Fix Coding Standards (7.4) #2 * Fix Coding Standards (7.4) - Fix whitespaces * Fix Coding Standards (7.4) - Fix whitespaces in tests * Fix Coding Standards (7.4) - Fix more things * Refactor tests into separate methods * Fix Coding Standards (7.4) - Equals sign not aligned with surrounding assignments
…#8340) * Fix Hidden fields triggering error when using getSingleScalarResult() Fixes #4257 HIDDEN fields was causing the "unicity" check to fail (NonUniqueResultException), because we was counting raw data instead of gathered row data. * Fix Coding Standards (7.4) * Fix Coding Standards (7.4) #2 * Fix Coding Standards (7.4) - Fix whitespaces * Fix Coding Standards (7.4) - Fix whitespaces in tests * Fix Coding Standards (7.4) - Fix more things * Refactor tests into separate methods * Fix Coding Standards (7.4) - Equals sign not aligned with surrounding assignments
…#8340) * Fix Hidden fields triggering error when using getSingleScalarResult() Fixes #4257 HIDDEN fields was causing the "unicity" check to fail (NonUniqueResultException), because we was counting raw data instead of gathered row data. * Fix Coding Standards (7.4) * Fix Coding Standards (7.4) #2 * Fix Coding Standards (7.4) - Fix whitespaces * Fix Coding Standards (7.4) - Fix whitespaces in tests * Fix Coding Standards (7.4) - Fix more things * Refactor tests into separate methods * Fix Coding Standards (7.4) - Equals sign not aligned with surrounding assignments
* 2.10.x: Bump PHPStan & Psalm (doctrine#9303) Removing list "Lifecycle Events" (doctrine#9243) Drop unneeded backslashes Fix Hidden fields triggering error when using getSingleScalarResult() (doctrine#8340) Findby joined lookup (doctrine#8285)
* 2.10.x: Bump PHPStan & Psalm (doctrine#9303) Removing list "Lifecycle Events" (doctrine#9243) Drop unneeded backslashes Fix Hidden fields triggering error when using getSingleScalarResult() (doctrine#8340) Findby joined lookup (doctrine#8285)
* 2.11.x: Bump PHPStan & Psalm (doctrine#9303) Removing list "Lifecycle Events" (doctrine#9243) Drop unneeded backslashes Fix Hidden fields triggering error when using getSingleScalarResult() (doctrine#8340) Findby joined lookup (doctrine#8285)
Using HIDDEN fields in a request was causing the "unicity" check to fail and throw a NonUniqueResultException, because we were counting raw data instead of counting gathered row data.
See #4257 for original issue.
PS: sorry if I've done something wrong in the contribution procedure, it's my first pull request :)