Commit 9f035188 authored by alexpott's avatar alexpott

Issue #2342377 by david_garcia: Fixed Non database agnostic expression in SQLContentEntityStorage.

parent 89b4f966
......@@ -823,7 +823,7 @@ protected function buildQuery($ids, $revision_id = FALSE) {
// Compare revision ID of the base and revision table, if equal then this
// is the default revision.
$query->addExpression('base.' . $this->revisionKey . ' = revision.' . $this->revisionKey, 'isDefaultRevision');
$query->addExpression('CASE base.' . $this->revisionKey . ' WHEN revision.' . $this->revisionKey . ' THEN 1 ELSE 0 END', 'isDefaultRevision');
}
$query->fields('base', $entity_fields);
......
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