Currently, SQLObject handles None objects in select WHERE
clauses slightly incorrectly; dbconnection.py generates statements
like the following:
SELECT * FROM Table WHERE Col = NULL;
However, this doesn't actually match columns that are NULL. For
that, you need:
SELECT * FROM Table WHERE Col IS NULL;
This patch, against SQLObject 0.6.1, implements this functionality
for all SELECTs generated by dbconnection.py when one of the
values is None.
However, we don't bother doing this for SELCT tests against 'id'
columns (which probably should never be NULL).
Log in to post a comment.