Commit e8ae7739 authored by alexpott's avatar alexpott

Issue #2236879 by andrei.dincu | tstoeckler: Broken condition in ContentEntityDatabaseStorage.

parent 4b172c72
......@@ -1137,7 +1137,7 @@ public static function _fieldSqlSchema(FieldConfigInterface $field, array $schem
// Define the revision ID schema, default to integer if there is no revision
// ID.
$revision_id_definition = $entity_type->hasKey('revision_id') ? $definitions[$entity_type->getKey('revision_id')] : NULL;
$revision_id_definition = $entity_type->hasKey('revision') ? $definitions[$entity_type->getKey('revision')] : NULL;
if (!$revision_id_definition || $revision_id_definition->getType() == 'integer') {
$revision_id_schema = array(
'type' => 'int',
......
......@@ -52,11 +52,11 @@ public function testFieldSqlSchemaForEntityWithStringIdentifier() {
->method('getKey')
->will($this->returnValueMap(array(
array('id', 'id'),
array('revision_id', 'revision_id'),
array('revision', 'revision'),
)));
$definition->expects($this->once())
->method('hasKey')
->with('revision_id')
->with('revision')
->will($this->returnValue(TRUE));
$field_type_manager->expects($this->exactly(2))
......@@ -68,8 +68,8 @@ public function testFieldSqlSchemaForEntityWithStringIdentifier() {
$fields['id'] = FieldDefinition::create('string')
->setName('id');
$fields['revision_id'] = FieldDefinition::create('string')
->setName('revision_id');
$fields['revision'] = FieldDefinition::create('string')
->setName('revision');
$entity_manager->expects($this->any())
->method('getDefinition')
......
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