Hey,
In our program we have the next lines:
if (!em.find(entity.id , entity.getClass()))
    return;

entity.refresh();

sometimes we get ArgumentException in the refresh line. 
The cause is that the entity is not managed by this context.
When we use em.contains(entity), the return value is false, but in other cases 
this is not enough and an EntityNotFoundException is thorwn.

Is it needed to check both - contains and find?

(our application is multithreaded)

thanks,
Michael and Udi

-- 
View this message in context: 
http://n2.nabble.com/ArgumentException-in-refresh%28%29-tp2552644p2552644.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to