[4.3] saving object in coldbox async interceptor causes duplicate execution of interceptor

13 views
Skip to first unread message

David

unread,
May 10, 2017, 10:00:39 AM5/10/17
to ColdBox Platform
I am seeing some behaviour that I dont understand when using an async interceptor in 4.3. I am announcing the interceptor in the postUpdate method of an orm object. 

InterceptorService.processState( "updateAlerts", { vendorGUID = getVendorGUID()}, true );

Which works fine if the interceptor is not saving any orm entities. but as soon as I try to create and save an object it starts doing everything twice. fires the post update twice, and fires the interceptor twice. There seems to be no link from the object I am creating in the interceptor and the object firing the postupdate method so I don't understand why its running again. 

David

unread,
May 11, 2017, 5:44:12 PM5/11/17
to ColdBox Platform
This ended up being an issue in the postload method of the vendor object, it was formatting some of the data and when the alert object saved it was flushing the orm session and saving the vendor record again etc.
Reply all
Reply to author
Forward
0 new messages