Skip to content
Snippets Groups Projects

Issue #2799479: Views doesn't recognize relationship to host

Merge request reports

Members who can merge are allowed to add commits.
Code Quality is loading
Test summary results are being parsed
Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 8 commits

    Compare with previous version

  • I've rebased this against the changes for 8.x-1.x.

  • Adam Bramley added 2 commits

    added 2 commits

    Compare with previous version

  • added 5 commits

    • bfc26307 - 1 commit from branch project:8.x-1.x
    • 6955c346 - Issue #2799479 by Drews_man: Views doesn't recognize relationship to host
    • a9de8610 - Issue #2799479 by nikita_tt,ao5357: Views doesn't recognize relationship to host
    • 68397b0b - Add missing filter plugin
    • 3dbf8d88 - Add missing tests

    Compare with previous version

  • added 9 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Primoz Hmeljak added 10 commits

    added 10 commits

    Compare with previous version

  • added 8 commits

    Compare with previous version

  • Sascha Grossenbacher resolved all threads

    resolved all threads

  • 65 'left_table' => $this->tableAlias,
    66 'left_field' => $left_field,
    67 'table' => $this->definition['field table'],
    68 'field' => $this->definition['field field'],
    69 'adjusted' => TRUE,
    70 ];
    71 if (!empty($this->options['required'])) {
    72 $first['type'] = 'INNER';
    73 }
    74
    75 if (!empty($this->definition['join_extra'])) {
    76 $first['extra'] = $this->definition['join_extra'];
    77 }
    78
    79 if (!empty($def['join_id'])) {
    80 $id = $def['join_id'];
  • 73 }
    74
    75 if (!empty($this->definition['join_extra'])) {
    76 $first['extra'] = $this->definition['join_extra'];
    77 }
    78
    79 if (!empty($def['join_id'])) {
    80 $id = $def['join_id'];
    81 }
    82 else {
    83 $id = 'standard';
    84 }
    85 $first_join = $this->joinManager->createInstance($id, $first);
    86
    87
    88 $this->first_alias = $this->query->addTable($this->definition['field table'], $this->relationship, $first_join);
  • 48 $table_mapping = $entity_type_manager->getStorage($entity_type_id)
    49 ->getTableMapping();
    50
    51 $entity_type = $entity_types[$entity_type_id];
    52 $base_table = $entity_type->getDataTable() ?: $entity_type->getBaseTable();
    53
    54 /** @var \Drupal\Core\Field\BaseFieldDefinition[] $fields */
    55 foreach ($fields as $field) {
    56 // Add a relationship to the target entity type.
    57 $target_entity_type_id = $field->getSettings()['target_type'];
    58 $target_entity_type = $entity_type_manager->getDefinition($target_entity_type_id);
    59 $entity_type_id = $field->getTargetEntityTypeId();
    60 $entity_type = $entity_type_manager->getDefinition($entity_type_id);
    61 $field_name = $field->getName();
    62 // Unlimited (-1) or > 1 store field data in a dedicated table.
    63 $table = $field->getCardinality() == 1 ? $base_table : $entity_type->getBaseTable() . '__' . $field_name;
    • field tables don't depend on the base table but the entity type. Aand there is logic with shortening too long table names, which isn't implemented here.

      This should use \Drupal\Core\Entity\Sql\DefaultTableMapping::getFieldTableName() or getDedicatedDataTableName() instead. The other hook is using this, it should also work for base fields.

    • Please register or sign in to reply
  • added 1 commit

    • d68b42fc - Address review in relationship plugin, align with core EntityReverse plugin

    Compare with previous version

  • James Scott added 1 commit

    added 1 commit

    • 6e180912 - Change dynamic property 'first_alias' to regular PHP variable, to fix PHP8.3 deprecation warning

    Compare with previous version

  • Chris Green added 3 commits

    added 3 commits

    • 6e180912...160384c2 - 2 commits from branch project:8.x-1.x
    • bd6922d6 - Merge branch entity_reference_revisions:8.x-1.x into 2799479-views-doesnt-recognize

    Compare with previous version

  • Please register or sign in to reply
    Loading