- πΊπΈUnited States byrond
We experienced the same thing. When using the relationship to get the root entity of the hierarchy, we are unable to filter by anything related to the root (title, content type, etc.). We only have access to the nid of the root node. We tried also adding a relationship to "get the actual content of the node revision" based on the root (Top) relationship, but there is no vid to join by.
- πΊπΈUnited States byrond
Here is an example Views query:
SELECT DISTINCT "node_field_data"."created" AS "node_field_data_created", "node_field_data"."nid" AS "nid", "eh_for_node_field_data"."nid" AS "eh_for_node_field_data_nid" FROM {node_field_data} "node_field_data" INNER JOIN (SELECT "eh_child"."id" AS "eh_child_id", "eh_child"."revision_id" AS "eh_child_revision_id", "eh_parent"."id" AS "nid" FROM {nested_set_field_book_page_parent_node_node} "eh_child" INNER JOIN {nested_set_field_book_page_parent_node_node} "eh_parent" ON (eh_child.left_pos BETWEEN eh_parent.left_pos AND eh_parent.right_pos) AND eh_parent.depth = 0) "eh_for_node_field_data" ON node_field_data.nid = eh_for_node_field_data.eh_child_id AND eh_for_node_field_data.eh_child_revision_id = node_field_data.vid WHERE ("node_field_data"."status" = '1') AND ("node_field_data"."langcode" IN ('***LANGUAGE_language_interface***')) AND ("eh_for_node_field_data"."title" LIKE 'Some title' ESCAPE '\\') ORDER BY "node_field_data_created" DESC
And the error when trying to use the relationship to filter by a field on the related node:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'eh_for_node_field_data.title' in 'where clause'
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Can you share the yml for your view?