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

validation module not working with jpa mapped entity, resource registry does not contain mapped entity as entry #421

Open
exports opened this issue Apr 28, 2017 · 1 comment
Labels

Comments

@exports
Copy link
Contributor

exports commented Apr 28, 2017

In katharsis validation module, when a jpa entity fails in validation, the ConstraintViolationExceptionMapper.java is invoked, and it tries to get the entity info with resourceRegistry.findEntry(clazz).
However this exception mapper is not working properly when using jpa entity with mapped dto support, the resource registry only contains the original entity class as entry, so findEntry() will always raise an error.

So this is actually a bug on resourceRegistry. it could be easily fixed by adding the mapped dto entry with exactly the same resource info when register jpa mapped entity repository in resourceRegistry.

@chb0github
Copy link
Contributor

I have assigned it to the author of that module.

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

No branches or pull requests

3 participants