I have been quite puzzled with .belongs() in the pass... I don't remember exactly was the cause of my problem at that time, I think it was if I was passing a list to .belongs() and it was empty. I think I had asking about that and get a answer from Niphold to... Let me searche that...
Richard On Thu, Aug 8, 2013 at 3:44 PM, Jonathan Lundell <jlund...@pobox.com> wrote: > On 8 Aug 2013, at 12:12 PM, Niphlod <niph...@gmail.com> wrote: > > Until now I assumed the problem of @Richard is that if a row has column == > None, if he queries the table with column != True he expected the NULL row > to show (because in python None is different from True). > > ~db.table.column=False will result in a WHERE NOT column = 'F'. You don't > get any row holding column == None with that query. > > What you said in your post > > That would be false for False and true for True and None (NULL) >> > > is what happens in python but not in any db backend, reason why it may > seem cumbersome to users accustomed to "compare" in python vs in databases. > > > Thanks for this. I've been puzzling over it myself the last couple of > days. It'd be helpful if your explanation, or at least a summary of it, > appeared in The Book. > > Would .belongs() work as expected (over True/False/None)? > > -- > > --- > 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. > > > -- --- 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.