cubicweb #9942503 ResultSet does not fill the entity cache when it's already cached [validation pending]

Say an entity X is already in the entity cache with an attribute cache missing the attr1 attribute.

In such a case, calling ResultSet.entities on a rset with a row referencing X and selecting attr1 does not complete the cache attribute of X.

This may be very confusing when using fetch_attrs to automatically complete an ORM-produced rset for optimization purposes, as it will not yield the expected benefits and is a bit hard to debug.

prioritynormal
typeenhancement
done in3.23.0
load1.000
load left0.000
closed by#c1eb5a676c80 [rset] Always complete attribute/relation caches in ResultSet.get_entity
patch[rset] Fill the entity cache in with rset values, even if is was already in cache [folded][rset] fix infinite recursion introduced in c1eb5a676c80 [applied][rset] Always complete attribute/relation caches in ResultSet.get_entity [applied][rset] refactoring of _build_entity method [applied][rset] refactoring of _build_entity method [in-progress]