[eluser]The Hamburgler[/eluser]
I've searched this thread and haven't found anything so apologies if this has already been discussed.
Example: I have two models, Customer & Brand. They have a many_to_many relationship.
I want to run a query that returns all Brands and has a flag/count if each brand is already linked with a given Customer. The query should also be able to order Brands by those already linked/not linked.
I'm looking for something like include_related_count but i need to be able to specify a specific related record and also return records not related.