Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] UpdateAllQuery and Persist executed inwrongorder!

As I mentioned before, UpdateAll/DeleteAll executing after all other sql is intentional default behaviour - it's not a bug (but UpdateAll executed twice would be). Postponing execution of UpdateAll/DeleteAll queries done because after UpdateAll/DeleteAll objects registered in the persistence unit (em cache) may become stale.

To execute UpdateAll/DeleteAll query immediately, set
 modifyQuery.setShouldDeferExecutionInUOW(false);


----- Original Message ----- From: "ossaert" <decooman@xxxxxxxxx>
To: <eclipselink-users@xxxxxxxxxxx>
Sent: Wednesday, July 29, 2009 4:27 AM
Subject: Re: [eclipselink-users] UpdateAllQuery and Persist executed inwrongorder!



Hello,


Andrei Ilitchev wrote:

(is it execute updateAllQuery; then flush, then persist? or
updateAllQuery,
then persist, then flush?)


The flush seems to play a minor part in this. When I omit the flush, the
result is the same except that I have only ONE update statement after the
INSERT.

Anyway, this code above should lead to the bug. I tried also a Delete-query,
but when the same result. The DELETE is then executed AFTER the INSERT
eventhough it is executed BEFORE the persist in the source-code.

Greetings,
Jan
--
View this message in context: http://www.nabble.com/UpdateAllQuery-and-Persist-executed-in-wrong-order%21-tp24698099p24714670.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users




Back to the top