Your server [you swagger server lib] <> clients...
3-party server [api...] <> [you swagger client lib] your server.
namespace Magento\Sales\Model\ResourceModel\Order;
class Payment extends SalesResource
{
// ...
protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
{
/**@var $object \Magento\Sales\Model\Order\Payment */
parent::_beforeSave($object);
if (!$object->getParentId() && $object->getOrder()) {
$object->setParentId($object->getOrder()->getId());
}
return $this;
}
}
INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);