What is the specificity limit of EntityFieldQuery / fieldCondition? I have a webform that I want to grade, like a quiz. (No, not with the Quiz module).
I have a content type called Answer Key with a Reference field called field_answer_quiz. 
Upon webform submission, I want to:


Look through all nodes of type Answer Key
Find the one with a field_answer_quiz value == the current webform
Use node_load() or something to pull out content



Here's a Q&amp;A that makes it seem possible: how to extract values of field collection using Entityfieldquery?

But here's a comment that makes it seem impossible:


  If that's what you want, then this is the correct way and EntityField does not help you. What EntityFieldQuery does is load entity IDs of entities based on their properties and fields. You could for example use it if you want to load the node(s) that has a specific version value by first loading the field collection item and then loading the node that references the field collection item. You're doing the opposite, you have the node and want the version value. To get field values, you always need to load the entities. 


So, which is it? Is it going to be possible for me to use EntityFieldQuery to do this? I'd really like to avoid having to load a ton of nodes just to shuffle through them.

This is the code I am using.

function webformta_webform_validation_validate($validator_name, $items, $components, $rule) {
$arg = arg();
$nid = $arg[1];
dsm('The NID of the current node is '.$nid);
$query = new EntityFieldQuery;
$result = $query
    -&gt;entityCondition('entity_type', 'node')
    -&gt;propertyCondition('status', 1)
    -&gt;propertyCondition('type', 'quiz_answer_key')     
    -&gt;fieldCondition('field_answer_quiz_nid', 'value', $nid, '=')
    -&gt;execute();
    $results = $query-&gt;ordered_results;
  dsm($results);


It causes the following error:


  PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_field_answer_quiz0.field_answer_quiz_value' in 'where clause': SELECT 
  [...] (error is really really long)
Yes, it is possible.

The second question is different, what you are describing is exactly what EFQ can do.

Something like this should work:

-&gt;fieldCondition('field_answer_quiz', 'nid', $nid)


The column names in the field tables are a combination of the field name and the column name, you need to split that up like the above example.