Refactored query-ref="#[payload.dbObject]" to
query-ref="#[payload.queryRef]