It can't - an EntityFieldQuery
will only ever load the entity ID, and the bundle keys.
There's no choice but to use node_load_multiple()
(or the equivalent if using a different entity type).
$nodes = node_load_multiple(array_keys($results['node'$results['node']));
Bear in mind that the $conditions
parameter of node_load_multiple()
is deprecated; in favour of EntityFieldQuery
as I understand it.
You could theoretically subclass EntityFieldQuery
and override the execute()
method to return the fully loaded entities - but you'll also need to extend the class so it always knows what entity type it's querying for; otherwise it won't know which key to use in $results
.