#9536: sql error (1054, "Unknown column 'scripts_script.id' in 'on clause'")
---------------------------------------------------+------------------------
          Reporter:  sergo                         |         Owner:  nobody     
             
            Status:  closed                        |     Milestone:             
             
         Component:  Database layer (models, ORM)  |       Version:  SVN        
             
        Resolution:  worksforme                    |      Keywords:  sql 
tagging multilingual
             Stage:  Unreviewed                    |     Has_patch:  1          
             
        Needs_docs:  0                             |   Needs_tests:  0          
             
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by sergo):

  * status:  new => closed
  * resolution:  => worksforme
  * has_patch:  0 => 1
  * component:  Uncategorized => Database layer (models, ORM)

Comment:

 After some debugging I've found the exact place where "FROM `proj_project`
 , `tagging_taggeditem` ..." part is composing.
 It is in the django/db/models/sql/query.py file, get_from_clause(self)
 function, line 562.

 I've changed:
 connector = not first and ', ' or ''
 to:
 connector = not first and 'JOIN ' or ''
 so "FROM `proj_project` , `tagging_taggeditem`" piece became "FROM
 `proj_project` JOIN `tagging_taggeditem`" and tagging started to work.

 This patch resolve my particular problem with tagging+multilingual
 applications, so I don't know if it's a bug in Django, or it fixes somehow
 tagging/multilingual's problem.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9536#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to