Replacement for always_refresh in query method

Issue #660 resolved
Former user created an issue

Make a method like query.populate_existing().filter(...).all() which replacess all attributes of objects already in session. It should work with eagerloading too, in order to refresh a big set of different objects in one query.

Comments (4)

  1. Former user Account Deleted

    I submit patch wich allows to use new query option: populate_existing()

    Should use like session.query(Class).options(populate_existing(),...).filter(..)..

    All objects already in session and in query will reload attributes.

    I think it's more logical to make this behavior an option of query rather than a generative method.

  2. Log in to comment