unique_together on SQLite uses 'iexact' matching, I expected this to be 'exact'
|Reported by:||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have a model that has:
class Meta: unique_together = (('gecko_engine_instance', 'name'), ('gecko_engine_instance', 'dhcp_client_identifier'), )
For the 'dhcp_client_identifier' "foo" is different from "Foo."
However the query that was enforcing uniqueness ends up looking line:
SELECT "dcs_client"."id" ... blah blah .. WHERE ("dcs_client__gecko_engine_instance"."id" ILIKE '1' AND dcs_client"."dhcp_client_identifier" ILIKE 'blarg')
which will fail if I have another client object with a dhcp_client_identifier of 'Blarg.' I figure there must be a reason for this although it causes me problems. Perhaps it is some strange compatibility with sqlite3.
I need to know if this is a bug, a workaround, or working as intended so I can modify my code appropriately?