Luke Plant wrote: >I can't see how this would work -- an entry can have many authors, so >which one do you order by? > > I'm having very hard time explaining this to my current customer :-). 'What can be hard about sorting?', he says... 'In Java you'll get this for every list in a project in a couple of minutes'.
>The test of whether it can be included as a feature in the Django ORM is >whether you can do it in SQL, and do it in a generic way. > > It looks impossible on the SQL side. I thought you coud join tables, order by a field in authors table and then get results with DISTINCT to eliminate duplication from joining. But it appears that DISTINCT requires you to select fields that you order by which ensures that duplication would stay. So the only way I see is to get everything on the client side and sort in memory retreiving author list for each entry and making it a string... Meaning that it would kill the DB right after first 10 users will make their first 10 records. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---