I created taxonomy 'Questions' and I have few questions as terms. Users can creates 'Answers' (content type based on nodes) and those have field_question - term reference to question.
Can I retrieve all questions of user in alphabecital order of answer name?
I guess I need special join to accomplish this task. Now I have something like this:
$query = new EntityFieldQuery(); $entities = $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'answer') ->propertyCondition('status', 1) ->propertyCondition('uid', $uid) ->fieldOrderBy('field_question', 'name') // ?? 'name' isn't correct ->execute();
I know that this condition couldn't work, because in table 'field_data_field_question' is no information about name of question just tid.
How can I add join to EntityFieldQuery? Or how to accomplish this task without EntityFieldQuery?