Changes between Initial Version and Version 1 of Ticket #33838, comment 3
- Timestamp:
- Jul 11, 2022, 2:37:15 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33838, comment 3
initial v1 5 5 In other words, if you break integrity expectations of `ForeignKey` you must also adjust your code to do so and in your particular case if a `Book` is still allowed to exist without a person the proper way to represent that is by setting `null=True` on your field as you've discovered. 6 6 7 Adapting the ORM to special case `db_constraint=False` like it does with `null=True` has a few implications that [https://docs.djangoproject.com/en/4.0/internals/contributing/bugs-and-features/#requesting-features should be debated on the mailing list] before a decision is taken because [https://github.com/django/django/commit/b55cde054ee7dd22f93c3522a8ddb1d04193bcac it was not done when the change was merged].7 Adapting the ORM to special case `db_constraint=False` like it does with `null=True` has a few implications that [https://docs.djangoproject.com/en/4.0/internals/contributing/bugs-and-features/#requesting-features should be debated on the mailing list] before a decision is taken because [https://github.com/django/django/commit/b55cde054ee7dd22f93c3522a8ddb1d04193bcac it was not done when the feature was added].