On Saturday, May 12, 2018 at 9:49:34 AM UTC-4, Mike Bayer wrote: > > > The former would be a bug. The latter, I'm not sure what you would expect > it to do. Do you want the unloaded attributes to raise attribute error? > Or did you want the get() to fully refresh what was not loaded (that is > doable). >
The latter. The closest thing I've been able to get the behavior I need with is a separate session. This need came due to application growth over a long period. The application previously had two phases: * phase 1: lots of eagerloading and joinedloading * phase 2: leverage get(), which hits items loaded in phase1 99% of the time. i just finished up some changes to the authorization system, which is now using a dogpile cache with a small subset of keys on short timeout. when there is a cache miss, this component executes sql before "phase 1" – i'll call this "phase 0". a handful of items accessed in "phase 2" are now loaded into the identity map during "phase 0", instead of being a miss. instead of saving a Sql query, i'm now 20+ queries per object. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ 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 "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.