diff --git a/modules/salesforce_push/src/Commands/SalesforcePushCommands.php b/modules/salesforce_push/src/Commands/SalesforcePushCommands.php index 5bc622289f033e28f756651890ef46e2f190f552..e56b9b15e297b7526e9030a1f86dc41b4ae14637 100644 --- a/modules/salesforce_push/src/Commands/SalesforcePushCommands.php +++ b/modules/salesforce_push/src/Commands/SalesforcePushCommands.php @@ -161,9 +161,9 @@ class SalesforcePushCommands extends SalesforceMappingCommandsBase { $op = MappingConstants::SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE; $time = time(); $insertQuery = "REPLACE INTO salesforce_push_queue (name, entity_id, mapped_object_id, op, failures, expire, created, updated) - (SELECT '$mapping_name', drupal_entity__target_id, id, '$op', 0, 0, $time, $time FROM salesforce_mapped_object"; + (SELECT '$mapping_name', drupal_entity__target_id, id, '$op', 0, 0, $time, $time FROM salesforce_mapped_object WHERE salesforce_mapping = '$mapping_name' "; if (!empty($ids)) { - $insertQuery .= " WHERE drupal_entity__target_id IN (" . implode(',', $ids) . ")"; + $insertQuery .= " AND drupal_entity__target_id IN (" . implode(',', $ids) . ")"; } $insertQuery .= ")"; $this->database->query($insertQuery)->execute();