[hibernate-users] HHH-13941 or am I crazy refresh throwing EntityNotFoundException when contains returns true and find returns an instance.

Jason Pyeron jpyeron at pdinc.us
Fri Apr 17 16:51:27 EDT 2020


Anyone have ideas, or should I take this to the dev list and start diving into the Hibernate code?

> -----Original Message-----
> From: hibernate-users-bounces at lists.jboss.org <hibernate-users-bounces at lists.jboss.org> On Behalf Of
> Jason Pyeron
> Sent: Sunday, April 12, 2020 10:11 AM
> To: hibernate-users at lists.jboss.org
> Subject: Re: [hibernate-users] HHH-13941 or am I crazy refresh throwing EntityNotFoundException when
> contains returns true and find returns an instance.
> 
> > -----Original Message-----
> > From: Peter Rader
> > Sent: Sunday, April 12, 2020 2:53 AM
> >
> > Hi Jason,
> >
> > I guess a second thread could meanwhile remove the entity from the database using the
> 
> Should have stated some assumptions.
> 
> 1. single threaded
> 2. manual examination of table's rows, shows the row present.
> 
> 
> > entitymanager. This way the entity is removed from the database, evited in the cache and
> > the proxy of the entity is decoupled from the session (hibernate-session in example)
> >
> 
> Thanks, I do have a more complete/specific test case attached to the HHH-13941 ticket. It fails
> against ever 5.x and 4.x version I throw at it.
> 
> <snip/>
> 
> >
> >
> >
> > Gesendet: Sonntag, 12. April 2020 um 03:48 Uhr
> > Von: "Jason Pyeron"
> >
> > if (em.contains(o) && null!=em.find(o.getClass(),o.getId()))
> > {
> > em.refresh(o); // throwing EntityNotFoundException
> > }
> >
> > This should never be possible, right?
> >
> > _______________________________________________
> > hibernate-users mailing list
> > hibernate-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-users
> 
> 
> 
> _______________________________________________
> hibernate-users mailing list
> hibernate-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-users



More information about the hibernate-users mailing list