At the moment views uses the following LEFT JOINS:

 LEFT JOIN term_node term_node ON node.vid = term_node.vid
 LEFT JOIN nat nat ON term_node.tid = nat.tid

which will not return any data from nat table if nat term is not associated with the node (eg there is no record in term_node table).
Correct way would be create join using

LEFT JOIN nat nat ON node.nid = nat.nid

Patch to follow

CommentFileSizeAuthor
#1 nat.views_.inc_.patch731 bytesnonsie

Comments

nonsie’s picture

Status: Active » Needs review
StatusFileSize
new731 bytes

Patch attached

Zen’s picture

Assigned: Unassigned » anantagati
anantagati’s picture

Status: Needs review » Closed (works as designed)

If you use filter or argument with NID. It will return nodes which are under term which is associated with that NID through nat table.

I don't see anything wrong on that query and it works as it should.

Reopen issue if it is not clear.