OrderBy filters out row with empty field in EntityFieldQuery

Viewed 1205

For example, I have a EFQ request like:

$query  ->entityCondition('entity_type', 'node')
        ->entityCondition('bundle', 'contenttype')    
        ->propertyCondition('status', 1)
        ->propertyCondition('language', $language->language, '=')
        ->fieldOrderBy('field_date', 'value', 'DESC')
        ->fieldOrderBy('field_code', 'value', 'DESC')

The field_code is nullable. When I order by this field, it will exclude all rows which got a null value. How to avoid this behavior and let them stay in the result?

1 Answers
Related