I have the following query:
$query = \Drupal::entityQuery('node')->condition('type','article');
$result = $query->execute();
Then I want to access all content:
$nodes = \Drupal\node\Entity\Node::loadMultiple(array_keys($result));
But in variable $results, there are wrong NIDs. My first article ID is '12' and second article '13'. But in $result are '9' and '10'
Do you have an explanation for this?
Ok, I found out I can't use array_keys... because keys are not same as IDs. Proved just now in an easy example... in my $result[9] there is the right id '12'.