Thanks, Donald and Fay. Your guess was exactly right. There was a bug in
Spring 3.0.1 that caused 'PersistenceVersion' to always be set to 1.0
<http://jira.springframework.org/browse/SPR-6975>. With a fix in place, I am
now seeing the expected behavior in OpenJPA for every case save one:
try {
TestEntity refreshRemoved = new TestEntity("refresh removed");
em.persist(refreshRemoved);
em.flush();
em.remove(refreshRemoved);
em.flush();
em.refresh(refreshRemoved);
logger.error("ERROR: No exception from em.refresh(removed)");
} catch (IllegalArgumentException e) {
logger.info("SUCCESS: Refresh removed");
} catch (Exception e) {
logger.error("ERROR: Unexpected exception from
em.refresh(removed): " + e.toString());
}
I've updated OPENJPA-1562 accordingly.
On Mar 11, 2010, at 3:46 PM, DWoods [via OpenJPA] wrote:
> Is Spring 3.0 supplying a JPA 1.0 implementation and/or API on the
> classpath?
>
> I'm not a Spring user, so no real help here...
>
> -Donald
--
View this message in context:
http://n2.nabble.com/Refreshing-detached-entities-tp4717312p4720364.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.