I use PostgreSQL and got error for text type target_id.

src/Batch/Updater.php

    $result = $query->accessCheck(FALSE)
      ->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT')
      ->condition("{$field_config->getName()}.target_id", '', '<>')
      ->execute();

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type bigint: "" LINE 6

Shall we use condition("{$field_config->getName()}.target_id", 0, '>') ?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

shenzhuxi created an issue. See original summary.

shenzhuxi’s picture

Issue summary: View changes

nickolaj made their first commit to this issue’s fork.

nickolaj’s picture

Status: Active » Needs review

Fixed the PostgreSQL compatibility issue by changing the target_id condition from comparing against an empty string to using a numeric comparison (`> 0`). This resolves the "invalid input syntax for type bigint" error.