You say you're performing multiple flushes inside a single transaction, which 
means you're controlling the transactions manually.

In this case you could implement your own OnTransactionCommit event, and move 
the logic you have in the PostFlush event-listener to a OnTransactionCommit 
event-listener. That should make sure the external search server is only 
indexed when the entire transaction is committed.

--  
Jasper N. Brouwer
(@jaspernbrouwer)


On 5 November 2014 at 13:35:15, James Brook ([email protected]) wrote:

> Thanks for the info Marco. I think my issue is that flush is called multiple 
> times inside  
> the single transaction that is rolled back. I guess there isn’t an event 
> handler at the  
> transaction commit level that I could use to handle the entities that were 
> changed by  
> the various flushes inside the transaction? Otherwise I guess we probably 
> have to look  
> at finding a way to limiting ourselves to a single flush per transaction.


-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to