-
Type:
New Feature
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: django
-
None
-
None
-
Python Drivers
-
Needed
-
-
None
-
None
-
None
-
None
-
None
-
None
By default, model field unique constraints treat NULL values as distinct from each other. That is, you can store multiple documents a NULL value. This is consistent with most SQL databases.
If a developer wishes to only allow one document with a NULL value, they should be able to use django.db.models.UniqueConstraint(nulls_distinct=False).