selectinload omit join

#7 · Created  · Last updated

Declined pull request

Dear contributor - This pull request is being moved to Gerrit, at, where it may be tested and reviewed more closely. As such, the pull request itself is being marked "closed" or "declined", however your contribution is merely being moved to our central review system. Please register at to send and receive comments regarding this item.

Closed by: ·2018-10-01


Hi there, as discussed by email [1], here I try to implement a way to make selectloadin bypass the join and filter right on the target table. I guess it is a bit hacky especially that I had to skip bakery to get the foreign keys (which I also don’t know if it is the right way).

So, let me know what you find and if I should change/add something.



  • Add test to expect the right result from omit_join=False

  • Change selectinload signature to accept omit_join

  • Fix expected query in test_flagged_selectinload_skips_join

  • Change selectinload to work when omit_join is True

    Right now this is suboptimal because I had to try and get the foreign keys outside of bakery.

0 attachments


Loading commits...