In [1] instead of RES.ID_ it should be RES.PROC_INST_ID_.
[1]: https://github.com/camunda/camunda-bpm-platform/blob/41502b2eb2fd11881166b1354aff3a4c1f0f66dd/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Execution.xml#L340