Ticket #1067 (new defect)

Opened 2 years ago

missing _ormbase in case of complex inheritance pattern

Reported by: szferi@… Owned by: andrew
Priority: major Milestone:
Component: migrations Version: unknown
Keywords: Cc:

Description

Lets have the following inheritance structure:
(Using south 0.7.4 and Django 1.3.1)

class Base(model.Model):
        f1 = IntegerField()

class OtherBase(Base):
       f2 = IntegerField()
       class Meta:
             abstract = True

class M1(OtherBase):
       f3 = IntegerField()

Django handles this situation well, the M1 have f1, f2, f3 attributes.
However if I create datamigration the orm.M1 wont have f1 attribute
only f2, f3. I guess the main reason is that the Migration.models
looks like the following:

 models = {
        'test.M1': {
            'Meta': {'object_name': 'M1'},
[...]

However it should look like this:

 models = {
        'test.M1': {
            'Meta': {'object_name': 'M1', '_ormbases': ['test.Base']},
[...]

Note: See TracTickets for help on using tickets.