Commit b6911a67 authored by catch's avatar catch
Browse files

Issue #3004300 by jonathanshaw, AndyF, joachim, Lendude, alx_benjamin,...

Issue #3004300 by jonathanshaw, AndyF, joachim, Lendude, alx_benjamin, quietone, webkarthik: EntityViewsData fails to set 'entity revision' in the table data for an entity's revision table

(cherry picked from commit 25180c43)
parent 794bea68
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -233,6 +233,7 @@ public function getViewsData() {
    if ($revision_table) {
      $data[$revision_table]['table']['group'] = $this->t('@entity_type revision', ['@entity_type' => $this->entityType->getLabel()]);
      $data[$revision_table]['table']['provider'] = $this->entityType->getProvider();
      $data[$revision_table]['table']['entity revision'] = TRUE;

      $views_revision_base_table = $revision_table;
      if ($revision_data_table) {
+2 −0
Original line number Diff line number Diff line
@@ -284,6 +284,7 @@ public function testRevisionTableWithRevisionDataTableAndDataTable() {

    $this->assertEquals('entity_test_mulrev', $data['entity_test_mulrev_property_revision']['table']['entity type']);
    $this->assertEquals('Entity test revision', $data['entity_test_mulrev_revision']['table']['group']);
    $this->assertTrue($data['entity_test_mulrev_revision']['table']['entity revision']);
    $this->assertEquals('entity_test', $data['entity_test']['table']['provider']);

    // Ensure the join information is set up properly.
@@ -340,6 +341,7 @@ public function testRevisionTableWithRevisionDataTable() {

    $this->assertEquals('entity_test_mulrev', $data['entity_test_mulrev_property_revision']['table']['entity type']);
    $this->assertEquals('Entity test revision', $data['entity_test_mulrev_revision']['table']['group']);
    $this->assertTrue($data['entity_test_mulrev_revision']['table']['entity revision']);
    $this->assertEquals('entity_test', $data['entity_test']['table']['provider']);

    // Ensure the join information is set up properly.