Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[DoctrineBridge] Allow to ignore specific nullable fields in UniqueEntity#49293
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
e083fb1
tobeee940
Comparecarsonbot commentedMar 2, 2023
Hey! I think@malarzm has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
Hi@nicolas-grekas, Would you have some time to review this PR ? |
Hi@fabpot maybe you have some time to take a look or redirect me to the right reviewer ? Thanks |
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.
Frankly I have a hard time figuring out a use case for this. Could you please share one?
src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I have an entity of UserRoles which are related to
For a specific Organization and Project, only one UserRole should exists. For the same User/Organization, you cannot have multiple null project
|
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.
Thanks for the use case, it makes more sense now!
Would you have time to take a look/review this@nicolas-grekas@fabpot ? |
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.
LGTM
src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Thank you@VincentLanglet. |
When the UniqueEntity is applied on multiple things the only option was
With this feature, it would be possible to ignore nullable values for specific field only and do not ignore nullable values for others.