This question is about Drupal plumbing. I know how, using the Views query builder, to display several taxonomy terms that are associated with a single piece of content. I can't figure out how Views actually queries the database to do this work.
For example, itβs easy to see that views show a list of blog posts containing one or more tags:
Title: "Brett Favre is Hurt" Body: "blah blah blah" Tags: Football, Injury Title: "Cliff Lee Signs Contract" Body: "blah, blah, blah" Tags: Baseball, Free Agency, Philadelphia
What I cannot understand is how Views deals with pulling multiple tags and rendering them with each content element. There is no SQL query in the preview request that includes a taxonomy.
My guess is that a subquery occurs in the Taxonomy field, or the query pulls several records and somehow groups the fields in the header and body (which seems rather inefficient).
I try to follow the standard Drupal rules for the custom module, and I would like to know how Drupal Views people run these queries, as they work pretty fast.
source share