You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a similar but not identical issue reported upstream in the protovalidate repo: bufbuild/protovalidate#92. I'd suggest opening a feature request there as any changes would need to be first made there, then verified in conformance tests, and then make their way to all of the language implementations.
Description
Messages in
Protobuf
have overridden equals method so they can usually be compared correctly.Suppose we have the following:
Steps to Reproduce
proto
file as described above and write a test to validate a message from the generated model.Expected Behavior
The validation should work.
Actual Behavior
The validation fails because the
protovalidate-java
doesn't support unique constraint on non-primitive types.Environment
Possible Solution
Disable the restriction in the code and allow arbitrary things to be compared to ensure uniqueness.
The text was updated successfully, but these errors were encountered: