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

On integration with Bean Validation and Jakarta Persistence #237

Closed
emmanuelbernard opened this issue Sep 1, 2023 · 4 comments
Closed
Labels
documentation Improvements or additions to documentation

Comments

@emmanuelbernard
Copy link

Looks like applying validation on save and saveAll is defined. But ti is also defined in JPA, JPA will validate entities upon insertion or update. Describe the mechanism to avoid double callor explicit in the spec that the double call is an expected behavior (maybe to do validation in sync vs async?)

@keilw
Copy link
Member

keilw commented Sep 1, 2023

While the Persistence Spec discusses "3.6. Bean Validation" there is no dependency in JPA to Validation.

Same should be with Validation or Persistence here.
Discuss them in the spec where appropriate, but there shouldn't be a hard dependency to either Persistence or Validation in the Data API (at least not in the "core" part)

@keilw keilw added the documentation Improvements or additions to documentation label Sep 1, 2023
@otaviojava
Copy link
Contributor

otaviojava commented Sep 1, 2023

We do the same; it will work as the capability or extension of the specification if the vendor wants it to do so.
You can check this session here:

https://github.com/jakartaee/data/blob/main/spec/src/main/asciidoc/jakarta-ee.adoc

@njr-11
Copy link
Contributor

njr-11 commented Sep 1, 2023

Pull #231 , which is currently in progress, covers Jakarta Validation, and does so in a way that does not introduce API dependencies on Jakarta Validation. I'm intending to get some updates for CrudRepository in there as well, once another pull merges. If either of you have comments, please add them to #231 .

@otaviojava
Copy link
Contributor

We were closing this issue once we had a PR fixing this point.
Thank you for the feedback, and feel free to reopen this PR as many times that make sense or create a new one.

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

No branches or pull requests

4 participants