On Sunday, February 4, 2018 at 11:07:49 AM UTC-5, Mike Bayer wrote:
> You test for NULL with == None. I have no idea what your issue is can you
> please share complete mappings, complete stack trace and a reproducible
> example? Thanks
This definitely needs a reproduction testcase to find the correct error as
Mike noted, but if you're stuck in a bind for a temporary fix you can try:
using `.op()` has gotten me out of a lot of problems.
you should also check the sql emitted, because you may need to
'.self_group()' the or_ elements.
or_(User.flag == None, User.flag != "dnd").self_group()
i haven't been able to create a reliable test case for the above, but there
are a handful of times in postgres queries where my or's haven't been
grouped as expected, leading to a bad query. i check everything now.
The Python SQL Toolkit and Object Relational Mapper
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.