Hi. So, I've got a view that has a relationship to what I think of as a "parent node".
One of my arguments uses this relationship. When I use it, the table gets joined in with a LEFT JOIN. Curiously, one of the join conditions ends up being field != value, where value was the value of the argument. It seems strange to me that, when trying to find things matching a certain value, we would make a join that brings in everything except what we want to find.
Could this simply be a bug? I found, in the function "ensure_my_table", where this join condition is added (into "extra"). When I changed the != to =, I got the results I expected. Could the bug be that simple? Perhaps there's something more subtle, such as that we got into that code path when we shouldn't have.
| Comment | File | Size | Author |
|---|---|---|---|
| views_arg_sense.diff | 627 bytes | galaxor |
Comments
Comment #1
dawehnerUpdate status.
Can't think of reason for != but this should be reviewed by merlinofchaos.
In general i think noone ever used summaries together with multiple tables.
Comment #3
merlinofchaos commentedThat condition is used for ORs where it's adding multiple joins and testing multiple conditions. When doing multiple joins against the same table, we add restrictions so that the additional joins won't just bring in the same data.
This is the intended behavior.
Comment #4
galaxor commentedHm. I guess the problem, then, is somewhere else. It's probably sending me to this code path when it should not.
I suspect the views_or module, since that's the most unusual thing I'm using in my arguments.
Comment #5
merlinofchaos commentedYes, the views_or module is going to choke on any field using that piece of logic, unfortunately.