Michael -

How are you enhancing your Entities?

> I have performed further testing by amending a query to be surrounded by
a begin() and commit() and the commit causes the db records to be updated
even though I know that no updates have taken place.
What fields are being updated? All of them? Are you running with SQL trace
enabled?

On Tue, Jan 17, 2012 at 9:12 AM, Michael Baylis
<maill...@baylishome.me.uk>wrote:

> Hi Folks,
>        I am experiencing an oddity that I can't google my way out of.
>
> I am running OpenJPA 2.1.1 under Tomcat 7.0.23 by using my own
> EntityManager object that I create when the application starts.
>
> What I am noticing is when I update a field in an entity and then commit
> the transaction,  all entities that I have read so far appear to be dirty
> and is updated in the backend database, even though I have not updated them.
>
> I have performed further testing by amending a query to be surrounded by a
> begin() and commit() and the commit causes the db records to be updated
> even though I know that no updates have taken place.
>
> I am obviously missing something in the setup that causes this, but I am
> at a loss to what.
>
> If I run a similar query outside of a Tomcat servlet, ie in native Java, I
> don't seem to encounter this problem.
>
> Any help in diagnosing this would be appreciated.
>
> Cheers,
>
> Michael
>



-- 
*Rick Curtis*

Reply via email to