From 27304fc152198e86100619d367009a64b175f4cb Mon Sep 17 00:00:00 2001 From: Jennifer Hodgdon Date: Wed, 16 Apr 2014 16:11:12 -0700 Subject: Issue #1885420 by cs_shadow, kim.pepper, xjm: Fix docs for metadata on node access queries --- modules/node/node.module | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules/node') diff --git a/modules/node/node.module b/modules/node/node.module index c6574abc0..5a4e01947 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -3290,6 +3290,17 @@ function node_query_entity_field_access_alter(QueryAlterableInterface $query) { /** * Helper for node access functions. * + * Queries tagged with 'node_access' that are not against the {node} table + * should add the base table as metadata. For example: + * @code + * $query + * ->addTag('node_access') + * ->addMetaData('base_table', 'taxonomy_index'); + * @endcode + * If the query is not against the {node} table, an attempt is made to guess + * the table, but is not recommended to rely on this as it is deprecated and not + * allowed in Drupal 8. It is always safer to provide the table. + * * @param $query * The query to add conditions to. * @param $type -- cgit v1.2.3