Changes between Initial Version and Version 1 of Ticket #24607, comment 8


Ignore:
Timestamp:
Jul 7, 2016, 9:56:37 AM (8 years ago)
Author:
Levi Cameron

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24607, comment 8

    initial v1  
    1 As it stands right now, `use_natural_primary_keys` doesn't work with multi-table inheritance with or without `use_natural_foreign_keys` -- the patch at least allows it to work if both `use_natural_primary_keys` and `use_natural_foreign_keys` are enabled.
     1As it stands right now, `use_natural_primary_keys` doesn't work with multi-table inheritance with or without `use_natural_foreign_keys` -- but there's no fundamental reason stopping this and the most recent patch at least allows it to work if both `use_natural_primary_keys` and `use_natural_foreign_keys` are enabled.
    22
    33
    4 The issue only arises when `use_natural_primary_keys` is set and `use_natural_foreign_keys` is not. In this case possible options are:
     4The patch changes serialization requires `use_natural_primary_keys` and `use_natural_foreign_keys` to both be set in the case of multi-table inheritance. Possible options where `use_natural_primary_keys` is set but `use_natural_foreign_keys` isn't:
    551. `use_natural_primary_keys` implies `use_natural_foreign_keys`
    6  1. Always
     6 1. Always (this is what the patch did)
    77 1. If there are any multi-table inheritance models defined that have a natural key
    88 1. Only for references to models that are involved in any multi-table inheritance
     
    1717
    1818If the patch was bought up to date with the latest django version, and it was changed to use option 2 (so `use_natural_primary_keys` did not turn on `use_natural_foreign_keys` but gave a warning if a likely problem was detected) then would this be acceptable?
     19
     20
     21(As an aside: if `use_natural_primary_keys` is set but `use_natural_foreign_keys` isn't then even for tables without multi-table inheritance it would seem that there is a sensitivity to the load/dump order in the referenced/referencing tables. The documentation at https://docs.djangoproject.com/en/dev/topics/serialization/ doesn't mention this anywhere)
Back to Top