Always use resources' current connection (i.e. engine instance) for operations, as the active memory engine instance may have been changed after resource definition.