Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Because field_sql_storage_field_storage_query
uses INNER JOIN
s instead of LEFT JOIN
s, it is not possible to use EntityFieldQuery
to query for entities without a value for a specific field.
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedFollowing.
Comment #2
supertwang CreditAttribution: supertwang commentedfollowing
Comment #3
pbuyle CreditAttribution: pbuyle commentedThe
INNER JOIN
s are actually done byfield_sql_storage_field_storage_query
. I don't known if any other field storage backend supportNULL
in field condition or not.The
INNER JOIN
s infield_sql_storage_field_storage_query
are also the cause of #1240566: In field_sql_storage_field_storage_query, any condition on a field's column excludes entities with a NULL value for this columnComment #4
pbuyle CreditAttribution: pbuyle commentedThe issue was already reported in #1226622: EntityFieldQuery doesn't support query for entities without a value for a specific field
Comment #5
grota CreditAttribution: grota commentedFor a workaround see #1157006.
Comment #5.0
grota CreditAttribution: grota commentedThe
INNER JOIN
s are actually done byfield_sql_storage_field_storage_query
.