resourceConnection = $resourceConnection; } /** * @inheritdoc */ public function getIds($mainTableName, $gridTableName) { $mainTableName = $this->resourceConnection->getTableName($mainTableName); $gridTableName = $this->resourceConnection->getTableName($gridTableName); $select = $this->getConnection()->select() ->from($mainTableName, [$mainTableName . '.entity_id']) ->joinLeft( [$gridTableName => $gridTableName], sprintf( '%s.%s = %s.%s', $mainTableName, 'entity_id', $gridTableName, 'entity_id' ), [] ) ->where($gridTableName . '.entity_id IS NULL'); return $this->getConnection()->fetchAll($select, [], \Zend_Db::FETCH_COLUMN); } /** * Returns connection. * * @return AdapterInterface */ private function getConnection() { if (!$this->connection) { $this->connection = $this->resourceConnection->getConnection('sales'); } return $this->connection; } }