Not to be flip, but couldn't you just reverse the test and use ~(mytable.mybool==False)? That would be false for False and true for True and None (NULL)
But I agree it is an interesting find, and I will watch out for this in my own code. Thanks for posting! -- Joe On Wednesday, August 7, 2013 2:00:42 PM UTC-7, Richard wrote: > > Hello, > > Found this not working : > > db((db.mytable.id == 1) & (db.mytable.mybool != True).select() > > That translate as : > SELECT * FROM mytable WHERE mytable.id = 1 AND mytable.mybool <> 'T' > > NO RECORD, BUT THERE IS A RECORD > > If i change the select like this : > SELECT * FROM mytable WHERE mytable.id = 1 AND mytable.mybool IS NOT TRUE > > I get my record. > > The issue seems to occure only when the "mybool" is NULL other then that > (TRUE or FALSE) I got my record... > > Thanks > > Richard > > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.