Skip to content
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

Impossible to save null to nullable boolean field #2580

Closed
aivus opened this issue Dec 14, 2016 · 5 comments
Closed

Impossible to save null to nullable boolean field #2580

aivus opened this issue Dec 14, 2016 · 5 comments

Comments

@aivus
Copy link
Contributor

aivus commented Dec 14, 2016

It's impossible to save null to nullable boolean field.
PDO::PARAM_BOOL converts any values to true/false.
PDO::PARAM_NULL could be used for this purpose

But I don't see a good approach for this.
It would be great to have value in Type::getBindingType() in BooleanType or any other approach.

I can prepare PR if we find solution for this.

It was discussed in #632 but solution wasn't found.

@deeky666
Copy link
Member

This requires a use-case that reveals the issue, at best a test case.

@aivus
Copy link
Contributor Author

aivus commented Jan 22, 2017

@deeky666 test exists, but it has incorrect value:

And some discuss here:
https://github.com/doctrine/dbal/pull/632/files#r15512990

@deeky666
Copy link
Member

@aivus I remember the issue. I don't see what we can do about it as it seems to be a bug in the PDO driver with emulated prepares. IMO it has to be fixed in PHP. I don't have a solution for this other than disabling emulated prepares.

@morozov
Copy link
Member

morozov commented Jul 26, 2021

Closing as stale and likely unrelated to the DBAL.

@morozov morozov closed this as completed Jul 26, 2021
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants