openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <>
Subject em.refresh() semantics
Date Thu, 04 Oct 2007 20:59:05 GMT
>From reading the spec and the Pro EJB 3 book, I was under the impression
that a call to em.refresh() would refresh from the database regardless.  No
questions asked.  But, I am finding that we don't work that way.  I made a
simple update to our simple PersistenceTest using the AllFieldTypes
(non-versioned) and NamedEntity (versioned) objects.  And, neither one will
load when refresh() is called.  For some reason, with the AllFieldTypes,
none of the fields are being detected as being updated.  And, with the
NamedEntity, since the version field hasn't been updated, then it doesn't
refresh the rest of the object.

>From my reading, this doesn't sound like proper processing.  But, before I
start making any changes, I'm looking for alternate interpretations of the
spec.  Thanks.

I've attached a patch for PersistenceTest, if you are interested in trying
it out.


View raw message