Drupal::entityQuery query content type getting content from other content type

Created on 31 January 2023, almost 2 years ago
Updated 14 July 2023, over 1 year ago

Defined 'type', 'custom_contentype' in entityQuery('node') getting data of other content type as well.

How we can get only the defined content type value in result

$nids = \Drupal::entityQuery('node')
        ->condition('status', 1)
        ->condition('type', 'account_content','=')
        ->condition('field_account', $accountid)
        ->execute();
💬 Support request
Status

Closed: outdated

Version

8.9 ⚰️

Component
Node system 

Last updated 4 days ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024