That's essentially correct - react to the database change by logging the entity that was modified. Then in the command-ended reactor read the logged entity ID, disable the database reactor (so you don't loop), change it, then re-enable the database reactor.
Note that you can run into problems when entities can be direct-edited without issuing a command e.g. editing block attributes via the Properties panel.