# HG changeset patch # User Sylvain Thénault # Date 1249284248 -7200 # Node ID 4ae7d02ce06374acf1f7d4e6c6b520a4d4306e7e # Parent b0a2e779845c275c919ac2968c9caab3c89832b7 F [rset repo cache] set entity.rset when no set on entities retreived from the cache diff -r b0a2e779845c -r 4ae7d02ce063 rset.py --- a/rset.py Sun Aug 02 12:00:17 2009 +0200 +++ b/rset.py Mon Aug 03 09:24:08 2009 +0200 @@ -370,7 +370,15 @@ # XXX should we consider updating a cached entity with possible # new attributes found in this resultset ? try: - return req.entity_cache(eid) + entity = req.entity_cache(eid) + if entity.rset is None: + # entity has no rset set, this means entity has been cached by + # the repository (req is a repository session) which had no rset + # info. Add id. + entity.rset = self + entity.row = row + entity.col = col + return entity except KeyError: pass # build entity instance