#28689: OuterRef outputs unquoted table name in SQL query under specific
circumstances
-------------------------------------+-------------------------------------
     Reporter:  Joey Wilhelm         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

 * stage:  Unreviewed => Accepted


Comment:

 Just applying that will trigger similar errors:
 {{{#!patch
 diff --git a/tests/expressions/models.py b/tests/expressions/models.py
 index 85f18fdf0e..0ace4024e9 100644
 --- a/tests/expressions/models.py
 +++ b/tests/expressions/models.py
 @@ -11,6 +11,9 @@ class Employee(models.Model):
      lastname = models.CharField(max_length=50)
      salary = models.IntegerField(blank=True, null=True)

 +    class Meta:
 +        db_table = 'expressions_Employee'
 +
      def __str__(self):
          return '%s %s' % (self.firstname, self.lastname)

 @@ -29,6 +32,9 @@ class Company(models.Model):
          related_name='company_point_of_contact_set',
          null=True)

 +    class Meta:
 +        db_table = 'expressions_Company'
 +
      def __str__(self):
          return self.name
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28689#comment:1>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.8ccb6dcb8574676104f89ded7f7f80ee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to