I think I can be confident that this issue won't happen between two
different requests... right?
I tried calling originalNextEvent.refresh() and also
deletedEventById.refresh and they both give me the following error:
Error, the test has not been properly run. Check the server logs, or
open this test in another browser tab to see the error page.
and the error:
A javax.persistence.EntityNotFoundException has been caught, No row
with the given identifier exists: [models.Event#56]
In /test/DeleteEventTest.java, line 39 :
originalNextEvent.refresh();
Show trace
javax.persistence.EntityNotFoundException: No row with the given
identifier exists: [models.Event#56]
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:
1196)
at
org.hibernate.ejb.AbstractEntityManagerImpl.refresh(AbstractEntityManagerImpl.java:
745)
at
org.hibernate.ejb.AbstractEntityManagerImpl.refresh(AbstractEntityManagerImpl.java:
713)
So, the error is fine, it accurately tells what's really happening...
But I still can't find a more confortable solution. So far now I'll
keep using the find("id = ?"... version
thanks a lot
saludos
sas