Need Assistance for Full Composite Primary Key Support in mssql-django

Hello @NandanaRaol,

I’m surprised you got that far in the process of adding support without noticing the feature flag that tuple lookups rely on.

I’m not familiar with MSSQL but if it doesn’t support tuple comparisons you must disable the supports_tuple_lookups feature on your backend which use the form you are referring to as a fallback.

Now you are referring to composite_pk.test_update.CompositePKUpdateTests.test_update_token_by_tenant_name which issues the following SQL

UPDATE "composite_pk_token"
SET "secret" = 'bar'
WHERE ("composite_pk_token"."tenant_id",
       "composite_pk_token"."id") IN
    (SELECT U0."tenant_id",
            U0."id"
     FROM "composite_pk_token" U0
     INNER JOIN "composite_pk_tenant" U1 ON (U0."tenant_id" = U1."id")
     WHERE U1."name" = 'A')

which seems to be used even if supports_tuple_lookups is disabled. Is this the issue you are running into?