bad None type handling in selectBy method
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
release 0.6.1, mysql connection
class Value (sqlobject.SQLObject):
_connection = conn
arg = sqlobject.ForeignKey ('arg')
value = sqlobject.StringCol (notNull = False,
default = None)
v = Value.selectBy (argID = 1, value = None)
which becomes something like:
select .... where arg_id = 1 and value = NULL
and is wrong query. What I expected was:
select .... where arg_id = 1 and value IS NULL
in MySQL "value = NULL" is different from "value is
NULL" (later is correct)
switching to sqlbuilder for the same query works nicely
with "Value.q.value == None", which becomes correct
"value is NULL"
Thank You.
Logged In: YES
user_id=4799
This has been fixed long ago in the Subversion repository.