The only issue with this JIRA ticket is why an exception is thrown in one case and not in the other?
Hibernate exists way longer than JPA and had certain semantics (throw an exception in this case), but JPA decided that this is not an error. With Hibernate 5.2 implementing JPA directly, there was no difference between using JPA interfaces vs. Hibernate interfaces anymore and the distinction between the semantics was established based on how Hibernate was booted up. Note that this is necessary to be JPA spec compliant. You’re not the first one asking for making this “jpaBoostrap” thing configurable though, so I’ll bring that up during our team meeting.
When this occurs, I want to be notified about it, whether I'm using a Hibernate session or the EntityManager.
So if you want the IMO safer semantics that Hibernate implements, then you’ll have to boot Hibernate up with the Hibernate native APIs.
It is disastrous that in one case an exception is thrown and in the other case not, even though it is the same semantics.
It’s not the same semantics, and that’s exactly the point. JPA demands there to be no exception.
This is simply a bad quality of the software. It is your decision to reopen the bug and thus improve the quality of the software.
Think what you want, but complain about this in the JPA issue tracker please. I clearly explained to you that this is the JPA specification demanding that behavior. Other compliant JPA providers will behave the same way. Ultimately, the bug is in your code, so instead of talking bad about the quality of software from an open source community that you are using for no charge, step back and think about what you want to achieve with your behavior. I can tell you that after such an insult, I definitely won’t prioritize any of your issues for some time. Good luck finding someone from the open source community wanting to work with you with such an attitude. |