- attached bug.py
Relationships on non-Integer fields fail under MSSQL
Using MSSQL, relationships on String fields don't work - the relationship always returns an empty list. I am attaching a minimal test case that demonstrates this. The same test case works correctly using SQLite.
Comments (9)
-
reporter -
reporter On further investigation, this appears to be a problem with adodbapi. adodbapi is returning no rows from the query, when it ought to!
I notice the query is constructed "... WHERE ? = contact.tsrid ..." Manually recoding it as "... WHERE contact.tsrid = ? ..." fixes the problem.
So potentially SA could have a workaround for this issue, but I am going to see if I can fix adodbapi first.
-
reporter It doesn't look like a problem with adodbapi per-se; seems ADO doesn't like the bind parameter being on the left hand side. I will have a go at recoding MSSQLSchemaGenerator to stop this happening.
-
reporter Sorry, I meant MSSQLCompiler not MSSQLSchemaGenerator
-
reporter Ok, I have a patch that makes this work!
-
reporter - attached mssql-bindprm-right.patch
patch for suggested fix
-
Account Deleted - changed status to resolved
(original author: ram) Committed in rev 2316, thanks
-
repo owner - changed milestone to 0.4.0
Milestone next micropoint release deleted
-
repo owner - removed milestone
Removing milestone: 0.4.0 (automated comment)
- Log in to comment
minimal test case