Changes between Version 2 and Version 3 of Ticket #28972


Ignore:
Timestamp:
Dec 29, 2017, 5:13:40 AM (7 years ago)
Author:
Kal Sze
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28972 – Description

    v2 v3  
    9595I have attached the `models.py` and `fixtures.json` files to the ticket.
    9696
     97I know that I don't (and I can't) enforce the natural key uniqueness at the database level. However, due to my application logic, I know that the user+license_key combination is effectively unique for any one of the child license models. And this is specifically allowed, [https://docs.djangoproject.com/en/2.0/topics/serialization/#deserialization-of-natural-keys according to the documentation]:
     98
     99 [U]niqueness doesn’t need to be enforced at the database level. If you are certain that a set of fields will be effectively unique, you can still use those fields as a natural key.
     100
    97101Also note that this bug doesn't have to do with my use of the custom `InheritanceManager`. I could let the `BaseLicense` model use the default manager and still get the same bug.
Back to Top