Hi group, Is there an easy way of ordering objects by the number of objects that stand in a ManyToMany relationship with it? My use case is the following:
I have two types of entities, tags and articles, that stand in a ManyToMany relation. I want to order the tags by the number of articles they label and then assign them different CSS classes depending on their popularity. I know how to do it in a lengthy and rather ugly way, but I suspect there should be an elegant way (I know a simple solution in SQL). Cheers and thanks in advance, -- Richard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---