You are here

public function Condition::exists in MongoDB 8

Queries for the existence of a field.

Parameters

$field:

string $langcode:

Return value

ConditionInterface

Overrides ConditionInterface::exists

See also

\Drupal\Core\Entity\Query\QueryInterface::exists()

File

src/Entity/Condition.php, line 26
Contains Drupal\mongodb\Entity\ContentEntityStorage.

Class

Condition

Namespace

Drupal\mongodb\Entity

Code

public function exists($field, $langcode = NULL) {
  $this
    ->condition($field, TRUE, '$exists', $langcode);
  return $this;
}