Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-15469 (
https://hibernate.atlassian.net/browse/HHH-15469?atlOrigin=eyJpIjoiNzZmOT...
)
Re: Missing EntityNotFoundException while using @ManyToOne / @OneToMany and EntityManager
interface (
https://hibernate.atlassian.net/browse/HHH-15469?atlOrigin=eyJpIjoiNzZmOT...
)
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 (
https://github.com/hibernate/hibernate-orm/blob/5.2/migration-guide.adoc ) ,
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 (
https://github.com/jakartaee/persistence/ ) 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.
(
https://hibernate.atlassian.net/browse/HHH-15469#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15469#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100234- sha1:9e2db29 )