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

UniquenessValidator doesn't work as expected #572

Closed
aonyskiv opened this issue Jan 18, 2017 · 0 comments
Closed

UniquenessValidator doesn't work as expected #572

aonyskiv opened this issue Jan 18, 2017 · 0 comments

Comments

@aonyskiv
Copy link

UniquenessValidator checks assigned field for uniqueness but simultaneously check whether primary key (id) doesn't equal. But it doesn't work correctly when entity is new. It does mean that id is null and validator check id for null and it is the cause of issue. Need to compare ids when entity isn't new in other words for UPDATE operation.

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