I have a content type called
foo and it has a textfield called
field_bar. I have one that has a value set to
I'd like to use the EntityFieldQuery object to find all
foos that have
field_bar with the
$nodeQuery = new EntityFieldQuery(); $nodeQuery->entityCondition('entity_type', 'node', '=') ->entityCondition('bundle', 'foo') ->fieldCondition('field_bar', 'value', '12345', '=');
The problem is that I get no results or error back. If I remove the fieldCondition, I get all
foos including the one I am looking for.
As the documentation is vague and only for experts, I googled a lot, but can't find any reason for my query not returning my node.
I also tried with
->fieldCondition('field_bar', 'value', array('12345'), '=');
to see if that matters, but its the same. I
$nodeQuery but can't see the executed SQL.
Is there anything special with textfields?