[rset] Always complete attribute/relation caches in ResultSet.get_entity
RQL queries are often designed to fill up the ORM's caches when fetching
entities out of the result set. Until now, if an entry already existed
in the entity cache, ResultSet.get_entity would return it unchanged,
not using the new ResultSet's contents to update the attribute cache,
breaking expectations (if the attributes are needed, they'd then be
fetched later one at a time, one entity at a time), resulting in loads
of DB accesses.
So we change ResultSet.get_entity so that:
* if the entity is already cached and has been instantiated from the
same rset, it is returned as-is (to avoid loops)
* if the entity is not yet cached, it is instantiated
* if the entity is cached via another rset, its attribute/relation
caches are completed
Closes #9942503
/var/log/cubicweb/*.log {
weekly
missingok
rotate 10
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -x /usr/sbin/invoke-rc.d ]; then \
invoke-rc.d cubicweb reload > /dev/null 2>&1; \
else \
/etc/init.d/cubicweb reload > /dev/null 2>&1; \
fi; \
endscript
}