Michael Bayer wrote: > > On Dec 9, 2013, at 11:20 PM, Jonathan Rogers > <jonathanrrog...@gmail.com <mailto:jonathanrrog...@gmail.com>> wrote: > >> >> I want to cache mapped objects from rows which will not change during >> the process lifetime of a web application, so I used the memory >> backend. Based on the comment in the example from SQLAlchemy 0.7.9, >> I have also implemented this approach of caching detached objects. It >> mostly works fine. However, sometimes objects lazily loaded from a >> collection relationship and cached via RelationshipObject are still >> detached when the application code gets them. It looks like >> CachingQuery.get_value() should make sure any objects loaded from the >> cache are merged, but somehow that's not happening. > > > the object coming out of merge() shouldn’t have anything detached > associated with it - it either merges along the relationship paths, or > it doesn’t and those relationships come out unloaded. is this > something you can distill down to a test case ?
Yeah, that's what I thought about merge. The behavior I've observed is intimately tied to my application so I'll try to come up with a test case based on just the Beaker caching example. -- Jonathan Rogers -- 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 http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.