1

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?

  • short answer, you cannot add joins to EntityFieldQuery. Maybe this will help :) – Marius Ilie May 17 '12 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.