-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update Jakarta Persistence Section annotation #461
Conversation
…l annnotations Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
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.
I'm pretty sure we have had this conversation before. We cannot require support for all annotations in Jakarta Persistence in combination with Jakarta Data without defining what the integration between the two specs actually means for each annotation. This list that is currently in the spec is there because the integration for those is clear. As others become well-defined in the spec, they can be added. It is wrong to simply state that all are supported. Jakarta Data does not define what it means to support them.
@njr-11 I'm not sure what you mean here. For the vast majority of JPA annotation, I don't see why there would be any specific integration concerns. A Jakarta Data supporting JPA is going to be based on a full JPA implementation, and so all the annotations should "just work", IMO. What am I missing? |
I'm trying to remember some of the examples that came up in the previous discussion. Just browsing through some of the Jakarta Persistence annotations that aren't listed there, one example might be |
OK so the issue is specifically with respect to querying? That's not really clear in the text of the spec. It sounded like it was saying you can only use specific JPA annotations on your entities, which would be weird. So, OK, yeah, with respect to querying I guess it's a good point that I suppose I need to think about a little bit further. We don't currently have any sort of straight well-defined dictionary from concepts in Jakarta Data querying to concepts in JPQL, so one can indeed be left wondering what something like "between" means for some specific type.
But on the other hand, we do already have the notion of attributes which are "sortable" and attributes which aren't. That is, we have Now, we should probably draw out that distinction in the spec, and say something about why an attribute might not be sortable. |
On the other hand, if we do #458, then such a dictionary is easy to write down. |
Yes, if we add that information to the spec, I think we could add EmbeddedId and probably a number of the relation attributes as required. |
If I understand correctly, NoSQL is adding support for embeddables, and so it makes sense to talk about them a bit more explicitly in the the Data spec. |
Thus, we need to improve. |
@gavinking @njr-11, so can we move forward and fix this aspect in other PRs? |
Look, why not just remove the bit that says "and requires support for all annotations in the Jakarta Persistence specification" which I intuit is what makes @njr-11 uncomfortable here. Jakarta Data doesn't need to mandate that JPA implementations implement JPA. The JPA spec already does that. |
Co-authored-by: Gavin King <[email protected]>
Change