How does \Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite::processRelations() work for a credit memo?

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Model/ResourceModel/Db/VersionControl/RelationComposite.php#L38-L48

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/etc/di.xml#L419-L426

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo/Relation/Refund.php#L7-L14

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Model/ResourceModel/Db/VersionControl/RelationInterface.php#L6-L20


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo/Relation/Refund.php#L46-L57


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo/Relation/Refund.php#L67-L73

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo/Relation/Refund.php#L118-L121


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo/Relation/Refund.php#L58-L61


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo/Relation/Refund.php#L133-L148


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo/Relation/Refund.php#L62-L63


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo/Relation/Refund.php#L150-L161


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment.php#L610-L622

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment.php#L624-L627


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment/Transaction/ManagerInterface.php#L37-L46

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment/Transaction/Manager.php#L62-L81

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment.php#L629-L642

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment.php#L643-L645


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment.php#L2418-L2435

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment.php#L646-L646

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Payment.php#L647-L656

See also: