NullBooleanField cannot be a primary key
|Reported by:||Owned by:||Jacob|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'm trying to implement the MS SQL Server backend (see #2358) and I find the following regression test in [source:django/trunk/tests/regressiontests/serializers_regress/models.py#4757 the serializer regression tests]:
class NullBooleanPKData(models.Model): data = models.NullBooleanField(primary_key=True)
Under MS SQL Server, no nullable field can be a primary key, and so I'm unable to pass this test at all.
My suggestion: delete the test. To me, it makes no sense.
However, since it seems to be the only test of its type, I suspect it was put in there for a reason. I'd love to hear alternatives as to how to deal with this issue.