Follow-up for #638032: Comment author/uid argument.
quoting myself:
The comment author's uid is stored in the comments table, so it would be natural being able to filter for "comment author uid" without adding a relation.
At the moment there is only a "comment author name" argument (because a copy of the author's username is also stored in the comments table), but no "comment author uid" argument. I think this is weird and should be changed.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 996922-comment-uid_nid-filter.patch | 1.6 KB | dawehner |
| #8 | 996922-comment-uid_nid-filter.patch | 876 bytes | dawehner |
Comments
Comment #1
donquixote commentedUsing a value that is already in the table we are using should not require a relation, thus saving the cost of an unnecessary JOIN. Especially, if it is something as basic as the comment author's uid.
There are more arguments in the linked issue, but I think all relevant things have been said in this one quote.
Comment #2
donquixote commented-- d.o. turbulence made me re-post the same thing again. --
Comment #3
dawehnerThere is no reason why this feature request shouldn't be part of d6 part of views.
Comment #4
donquixote commented@dereine,
sorry, I was not aware how we do this in views issue queue. Some maintainers want that issues are fixed in D7 before they go to D6. I'm totally fine with D6, and in fact this would be my use case for the time being.
Comment #5
iamjon commentedMarking this as an unassigned task. If anyone wants to roll up their sleeves and write a patch that would be awesome.
Comment #6
dawehner@donquixote
If you really have such problems here you should have taken your time and implement it :)
Once you are into the views api this issue isn't that hard.
Comment #7
dawehnerIn fact relationships + filter for the join field could be not automatically joined. This wouldn't be that easy from my perspective but perhaps doable.
Comment #8
dawehnerHere is a patch which does both for 7.x-3.x
assign for earl to decide whether it's good to not force the relationship again for certain fields.
In theory it would be possible to not add a join as long just the base field is used on the other table.
Comment #9
merlinofchaos commentedFor both of these, the title will need to change slightly to be more explicit; what's there now is aimed at the relationship. Possibly that should be moved to the relationship and a more generic one (and possibly help too) used for the argument/filter. And may as well make it a field too once we do that.
Once those are done, there's no problem with this.
Comment #10
dawehnerHere is a new version.
Comment #11
dawehnerCommited to 7.x-3.x and 6.x-3.x
Comment #12
donquixote commentedThanks!
> Once you are into the views api this issue isn't that hard.
Yeah, the patches look easy. But honestly, it would have taken me longer to figure that out. Next time, maybe.