remove bake_queries flag in relationship(); it does nothing

Issue #3572 resolved
Taha Jahangir created an issue

Documentation about bake_queries param states that using baked queries in enabled by default (1), but orm.ext.baked documentations says different. It seems bake_queries should be kept True, and lazy param should be set to baked_select to actually use baked queries. Also documentation of lazy param does not include the baked_select option.

[1] http://docs.sqlalchemy.org/en/rel_1_0/orm/relationship_api.html#sqlalchemy.orm.relationship.params.bake_queries

[2] http://docs.sqlalchemy.org/en/rel_1_0/orm/extensions/baked.html#lazy-loading-integration

Comments (4)

  1. Mike Bayer repo owner
    • rewrite the docs and add a test for the bake_queries=True relationship flag; this flag does have an effect when the baked lazy loader plugin has been invoked. clarify the intent of this flag as an "opt out" but only has an effect when the baked system is loaded anyway. fixes #3572

    → <<cset c7f9aa281857>>

  2. Mike Bayer repo owner
    • rewrite the docs and add a test for the bake_queries=True relationship flag; this flag does have an effect when the baked lazy loader plugin has been invoked. clarify the intent of this flag as an "opt out" but only has an effect when the baked system is loaded anyway. fixes #3572

    (cherry picked from commit c7f9aa281857eeeaf7963c370bda43d2eb4746f5)

    → <<cset e8c2e4a17994>>

  3. Mike Bayer repo owner

    OK, it does have an effect, it was just documented incorrectly. The baked extension does check the flag as an "opt out" flag, assuming you've already loaded the extension application-wide.

    for the use case that it looked like bake_queries is for, that is baked lazy for just this relationship, use lazy="baked_select".

  4. Log in to comment