symbol('NOT_SET') being used in a query

Issue #3368 resolved
Christophe Biocca created an issue

Relation without Foreign Key, when lazyloading (immediately after a session.flush()), tries to use symbol('NOT_SET') in a query.

I've attached a simple script that reproduces the problem on postgres, although I don't believe it to be backend specific.

Only happens on 1.0.0, earlier versions aren't affected.

Comments (3)

  1. Mike Bayer repo owner
    • Fixed a critical regression caused by 🎫3061 where the NEVER_SET symbol could easily leak into a lazyload query, subsequent to the flush of a pending object. This would occur typically for a many-to-one relationship that does not use a simple "get" strategy. The good news is that the fix improves efficiency vs. 0.9, because we can now skip the SELECT statement entirely when we detect NEVER_SET symbols present in the parameters; prior to 🎫3061, we couldn't discern if the None here were set or not. fixes #3368

    → <<cset d349ad448c02>>

  2. Mike Bayer repo owner

    thanks for reporting. I kind of knew that even with five betas, the real regressions weren't going to be found until the final release, but at least we found it!

  3. Log in to comment