dlamotte / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

additional tables in FROM clause cause new usage_for_queryset() code to fail #247

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In the fix for Django 1.2 committed in response to bug #233 the new Django 1.2 
code that gets the query compiler fails to call compiler.pre_sql_setup()

this omission results in invalid queries that have additional tables in their 
FROM clause as the extra from tables are never returned

the documentation for pre_sql_setup() is as follows:
   """
        If the update depends on results from other tables, we need to do some
        munging of the "where" conditions to match the format required for
        (portable) SQL updates. That is done here.

        Further, if we are going to be running multiple updates, we pull out
        the id values to update at this point so that they don't change as a
        result of the progressive updates.
        """

Original issue reported on code.google.com by james.p.turk on 1 Jul 2010 at 6:40

Attachments: