Yeah, you nailed it, I didn't even knew that the ignore_common_filters 
parameter even existed (I guess I forgot about my common_filter in the 
logged_user field). Now my query is returning everything ok.

Thank you! and my table's name is not 'my_table' I only use those names to 
simplify my questions ;)

El martes, 4 de octubre de 2016, 11:19:50 (UTC-5), Anthony escribió:
>
> On Tuesday, October 4, 2016 at 10:36:57 AM UTC-4, Bernardo Leon wrote:
>>
>> Now if I only run
>>
>> db(db.my_table.logged_user == 1)._select()
>>
>> I get:
>>
>> 'SELECT  my_table.id, my_table.my_column, my_table.logged_user FROM 
>> my_table WHERE ((my_table.logged_user = 1) AND (my_table.logged_user IS 
>> NULL));'
>>
>> Why is the query is trying to validate that the logged_user is null? 
>> thanks!
>>
>
> Seems odd. Do you have a common filter defined somewhere? What do you get 
> with:
>
> db(db.my_table.logged_user == 1, ignore_common_filters=True)._select()
>
> What does the table definition look like? Is there some code you're not 
> showing (presumably the real table name is not "my_table")?
>
> You may need to attach an app that reproduces the problem.
>
> Anthony
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to