#246 closed defect (duplicate)
Can't do circular ForeignKey relationships between classes
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Metasystem | Version: | |
Severity: | minor | Keywords: | model circular foreign key |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Example case:
- class Person belongs to a Company: ForeignKey(Company)
- class Company designates a contact Person: ForeignKey(Person)
However, each class requires the other to be defined first. How does one implement this?
Note:
See TracTickets
for help on using tickets.
This is a duplicate of #167.