Skip to content

Commit 3109997

Browse files
authored
LYNX-637: Update logic to get table name with prefix and other minor improvements
1 parent 2dbbe6b commit 3109997

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/code/Magento/OrderCancellation/Model/ResourceModel/SalesOrderConfirmCancel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function get(int $orderId): ?array
4040
$connection = $this->resourceConnection->getConnection();
4141
return $connection->fetchRow(
4242
$connection->select()->from(
43-
self::TABLE_NAME
43+
$this->resourceConnection->getTableName(self::TABLE_NAME)
4444
)->where(
4545
'order_id = ?',
4646
$orderId
@@ -60,7 +60,7 @@ public function insert(int $orderId, string $confirmationKey, string $reason): v
6060
{
6161
$connection = $this->resourceConnection->getConnection();
6262
$connection->insertOnDuplicate(
63-
self::TABLE_NAME,
63+
$this->resourceConnection->getTableName(self::TABLE_NAME),
6464
[
6565
'order_id' => $orderId,
6666
'confirmation_key' => $confirmationKey,

app/code/Magento/Sales/Model/ResourceModel/SalesOrderStatusChangeHistory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getLatestStatus(int $orderId): ?array
4747
$connection = $this->resourceConnection->getConnection();
4848
return $connection->fetchRow(
4949
$connection->select()->from(
50-
$connection->getTableName(self::TABLE_NAME),
50+
$this->resourceConnection->getTableName(self::TABLE_NAME),
5151
['status', 'created_at']
5252
)->where(
5353
'order_id = ?',
@@ -70,7 +70,7 @@ public function insert(Order $order): void
7070

7171
$connection = $this->resourceConnection->getConnection();
7272
$connection->insert(
73-
$connection->getTableName(self::TABLE_NAME),
73+
$this->resourceConnection->getTableName(self::TABLE_NAME),
7474
[
7575
'order_id' => (int)$order->getId(),
7676
'status' => $order->getStatus()
@@ -89,7 +89,7 @@ private function isOrderExists(int $orderId): bool
8989
$connection = $this->resourceConnection->getConnection();
9090
$entityId = $connection->fetchOne(
9191
$connection->select()->from(
92-
$connection->getTableName(self::ORDER_TABLE_NAME),
92+
$this->resourceConnection->getTableName(self::ORDER_TABLE_NAME),
9393
['entity_id']
9494
)->where(
9595
'entity_id = ?',

0 commit comments

Comments
 (0)