Hi,

This is a suggestion for when using filters in views on referenced nodes.

For example, imagine two node types, foo and bar. Foo has two fields: a reference to bar and a toggle (ON/OFF). Now let's say that we want to get all bar nodes and all foo nodes if the toggle is set to ON. If we try to filter, and there is no foo node, the bar node will not be returned. I don't think this should be default behavior.

More technically, the query should be LEFT JOIN foo ON (toggle = 1), not WHERE toggle = 1.

At least, an option to move the filter should exist.

The idea for this is new, as it is only possible after reverse node references were made possible.

Thoughts?

Comments

nagiek’s picture

Although I don't know if this is possible, as the toggle would be on a field table, not the node table, so I don't know if you can conditionally join tables like that.