-
Notifications
You must be signed in to change notification settings - Fork 52
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
Issue 238: Clarify mixing input parameter types for queries #341
Conversation
Signed-off-by: Will Dazey <dazeydev.3@gmail.com>
I decided to go with changing "undefined" with "invalid" because the EntityManager API for
I tested current behavior with OpenJPA, EclipseLink, and Hibernate as well. Both OpenJPA/EclipseLink providers currently throw appropriate IllegalArgumentException from EntityManager.createQuery(...) calls when the query is parsed mixing input parameter types. OpenJPA:
NOTE: EclipseLink:
|
I don't know how you tested this with Hibernate, but there are compatibility configurations that you must set in order for Hibernate to behave fully spec compliant. I'm pretty sure that if you set those setting, Hibernate will throw an exception as well. |
Hibernate is knowingly not spec compliant by default and you must instead set properties to be JPA spec compliant? I have not heard of this before. Mind sharing a link to the documentation for this? |
Regardless, if all providers fail, that adds even more weight that the specification should in fact describe mixing of input parameter types as "invalid" rather than just "undefined" |
Here are the various JPA compliance related configurations: https://docs.jboss.org/hibernate/orm/5.6/userguide/html_single/Hibernate_User_Guide.html#configurations-jpa-compliance |
Testing with the Hibernate "" property from the documentation you linked did result in Hibernate throwing an exception:
NOTE: Hibernate 5.2.18 did not change behavior, but 5.5.6 did. This issue must have been fixed at some point. I understand this Hibernate discussion is a side note to this JPA Spec issue, but does Hibernate have the ability to process the property |
Is it really that odd that a provider does things better by default? I mean really? |
Yes, I just added this for 6.0 - https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java#L2035-L2051 |
"Better" is a matter of opinion. Also, all I said was that I had not heard of this before for Hibernate and asked for a link to the documentation. Did I say something wrong? |
Fair enough. I'll let usage numbers tell the tale of what the general opinion is. Hibernate existed for many years before JPA. In fact, most parts of JPA were influenced by Hibernate. So some of this is "legacy". Well one - But honestly, for the most part Hibernate simply does do things better by default in these particular areas. |
And we really should not be having this conversation about Hibernate on the spec GitHub group. Feel free to ping us on Zulip, etc as outlined at https://hibernate.org/community/ if you want to continue discussing |
could we leave this sort of comments away from this place and stick to topic, please? IMHO it doesn't matter what the provider does "by default" as long as it satisfies the TCK rules Thank you. |
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 change looks good to me
I was answering a direct question asked here. But,
|
@lukasj |
fixes #238
Signed-off-by: Will Dazey dazeydev.3@gmail.com