Skip to content

Commit

Permalink
[expressions] Relation aggregate: fix cache key
Browse files Browse the repository at this point in the history
Fix #49469
  • Loading branch information
elpaso authored and nyalldawson committed Sep 24, 2024
1 parent b2ca621 commit 91c0b52
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/expression/qgsexpressionfunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,11 +877,11 @@ static QVariant fcnAggregateRelation( const QVariantList &values, const QgsExpre

parameters.filter = relation.getRelatedFeaturesFilter( f );

QString cacheKey = QStringLiteral( "relagg:%1:%2:%3:%4:%5" ).arg( vl->id(),
QString::number( static_cast< int >( aggregate ) ),
subExpression,
parameters.filter,
orderBy );
const QString cacheKey = QStringLiteral( "relagg:%1%:%2:%3:%4:%5:%6" ).arg( relationId, vl->id(),
QString::number( static_cast< int >( aggregate ) ),
subExpression,
parameters.filter,
orderBy );
if ( context->hasCachedValue( cacheKey ) )
return context->cachedValue( cacheKey );

Expand Down

0 comments on commit 91c0b52

Please sign in to comment.