Written by

Manager, Application Services at InterSystems
Question Ben Spead · Jun 19, 2018

Refresh object in memory from data on disk?

1) I have an oref pointing to an object on disk

2) I save the object which causes an UPDATE / AFTER Trigger to fire, and updates a value in an embedded object property

3)  I would like to see that new embedded property value in my in-memory object (for unit testing)

Is there a way to do this via a method call?  Or do I need to close the object and re-open it to see the updated value?

Thanks!

Ben

Comments

Ben Spead · Jun 19, 2018

I should have searched just a little longer.

obj.%Reload() 

I found this in Documatic for my class (inherited because it is persistent)

0