-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(core): add partial fix to micronaut hibernate validator and Valu… #6407
base: develop
Are you sure you want to change the base?
Conversation
|
||
@Override | ||
public void extractValues(Property<?> originalValue, ValueReceiver receiver) { | ||
receiver.value( null, originalValue.getValue()); |
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.
receiver.value( null, originalValue.getValue()); | |
receiver.value( null, originalValue.getExpression()); |
The value is computed late at rendering time
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.
The implementation is of course naive, I'll handle a better imp later
//TODO: Temporary to make the ValueExtractor work, but it's not supposed to say here | ||
public T getValue(){ | ||
return this.value; | ||
} | ||
|
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.
Please remove it, see the next comment for why
The real implementation of the value extractor would be way more complex. Then, at some point, we would also need to re-validate a property after rendering it ... So for you test to work, use an annotation in a String not an int, so the target type is the same. |
…eExtractor
What changes are being made and why?
A custom validator factory provider has been added to resolve a conflict between micronaut validator and micronaut hibernate validator. Now it is possible to use value extractors with hibernate validator
How the changes have been QAed?
Setup Instructions