#26186: When extending from abstract model, ForeignKey points to wrong 
application
----------------------------------------------+--------------------
     Reporter:  skyjur                        |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.9
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 This might be related to https://code.djangoproject.com/ticket/25858

 I have following code:

 '''app_A/models.py:'''

 {{{
 class AbstractModel1(Model):
     class Meta:
         abstract = True


 class AbstractModel2(Model):
     model1 = ForeignKey('Model1')

     class Meta:
           abstract = True


 class Model1(AbstractModel1):
     pass

 class Model2(AbstractModel12):
     pass
 }}}


 '''app_B/models.py:'''


 {{{
 from app_A.models import AbstractModel1, AbstractModel2

 class Model1(AbstractModel1):
     pass

 class Model2(AbstractModel12):
     pass
 }}}

 in Django 1.8, the `app_B.Model2.model1` would point to `app_B.Model1`,
 but in Django 1.9.2 it points to `app_A.Model1` so my code no longer
 works.

--
Ticket URL: <https://code.djangoproject.com/ticket/26186>
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/049.b2199d366662c33758ef10715da3f107%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to