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

Saving an empty string converts to nil, triggered NOT NULL violation. #3172

Closed
inopinatus opened this issue Jul 24, 2019 · 1 comment
Closed
Milestone

Comments

@inopinatus
Copy link

When saving an empty string, I don't expect it to be converted to nil. That is not normal behaviour. This breaks database NOT NULL string fields.

Probably caused by 9e528f1. I think that should be a configurable option, not a hard-coded behaviour.

Applications with schemas so badly defined that they actually need to map the empty string to NULL in string fields should have to configure that specially.

@inopinatus inopinatus changed the title bug: saving an empty string converts to nil, triggered NOT NULL violation. Saving an empty string converts to nil, triggered NOT NULL violation. Jul 24, 2019
@mshibuya mshibuya added this to the 2.0.0 milestone Aug 4, 2019
@inopinatus
Copy link
Author

Excellent fix I think. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants