Skip to content

GRAILS-5101: Compound "unique" constraints incorrectly pass validation if one of the fields is null #14656

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

Open
graemerocher opened this issue Sep 14, 2009 · 6 comments

Comments

@graemerocher
Copy link
Contributor

Original Reporter: wangjammer5
Environment: Not Specified
Version: 1.2-M2
Migrated From: http://jira.grails.org/browse/GRAILS-5101

@graemerocher
Copy link
Contributor Author

tiggerizzy said:
Unit tests at least still show that this is an issue in 1.3.7. Could this be scoped for 2.0?

@graemerocher
Copy link
Contributor Author

schlogen said:
I was still having this issue very recently and it was a pain to work around. Any chance this can get fixed?

@graemerocher
Copy link
Contributor Author

allnightlong said:
+1 for fix this bug (although it seems more like hibernate issue)

@graemerocher
Copy link
Contributor Author

cake said:
Still an issue in Grails 2.2.3

@droggo
Copy link
Contributor

droggo commented Jan 6, 2016

This is probably not a bug. It depends on database engine how unique index with null value works. For example for mysql unique will never fail if any of the values is null

@jameskleeh jameskleeh transferred this issue from apache/grails-core Nov 1, 2018
@apremkumar
Copy link

I am facing this as well. I'm using postgresql 9.5, grails 3.3.0, gorm 6.1.6.

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

No branches or pull requests

4 participants