Commit 8e225a7d authored by jameswilliams's avatar jameswilliams Committed by Ra Mänd
Browse files

Issue #3052183 by james.williams, daniels____, jstoller: Column not found:...

Issue #3052183 by james.williams, daniels____, jstoller: Column not found: 1054 Unknown column paragraphs_item.language
parent aa384c04
...@@ -330,8 +330,10 @@ class FieldCollectionItemEntity extends Entity { ...@@ -330,8 +330,10 @@ class FieldCollectionItemEntity extends Entity {
$query->entityCondition('entity_type', $entity_type); $query->entityCondition('entity_type', $entity_type);
$query->entityCondition('entity_id', $hostEntity->{$key}); $query->entityCondition('entity_id', $hostEntity->{$key});
$query->entityCondition('bundle', $bundle); $query->entityCondition('bundle', $bundle);
if (isset($entity_info['entity keys']['language'])) { // Only filter by language if this entity type has a language key that
$query->propertyCondition('language', $hostEntity->language); // has a corresponding field in its base table.
if (!empty($entity_info['entity keys']['language']) && !empty($entity_info['schema_fields_sql']['base table']) && in_array($entity_info['entity keys']['language'], $entity_info['schema_fields_sql']['base table'], TRUE)) {
$query->propertyCondition($entity_info['entity keys']['language'], $hostEntity->{$entity_info['entity keys']['language']});
} }
} }
$query->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT'); $query->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment