Opened 13 years ago

Closed 13 years ago

#17507 closed New feature (duplicate)

Fixture loading without pk with natural keys

Reported by: Brillgen Developers Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

While django used PKs to link data PKs were required to be present in the fixtures since they couldn't be predicted. But with natural_key support with Django 1.2 shouldn't fixtures make PKs optional?

Initially it can be left upto the test data to make sure that all objects without PK have correct natural foreign keys otherwise they will be linked incorrectly? Later on we can think of validating that objects without PKs do not objects linked to them without using natural keys. Although such validation is not done in the fixtures anyways.

I am estimating that is a very low hanging fruit but someone with more experience with this part of the code base can hopefully quickly comment till I go digging :).

Change History (1)

comment:1 by Russell Keith-Magee, 13 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #13252

Note: See TracTickets for help on using tickets.
Back to Top