Skip to content

Commit

Permalink
Fix table join (fix #7068)
Browse files Browse the repository at this point in the history
  • Loading branch information
minorua committed Mar 27, 2013
1 parent 87265c7 commit 3959f94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgsvectorlayerfeatureiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,12 @@ void QgsVectorLayerFeatureIterator::prepareJoins()
{
FetchJoinInfo info;
info.joinInfo = joinInfo;
info.indexOffset = *attIt - sourceLayerIndex;
info.joinLayer = joinLayer;
info.targetField = fields.indexFromName( joinInfo->targetFieldName );
info.joinField = joinLayer->pendingFields().indexFromName( joinInfo->joinFieldName );
info.indexOffset = *attIt - sourceLayerIndex;
if ( info.joinField < sourceLayerIndex )
info.indexOffset++;

// for joined fields, we always need to request the targetField from the provider too
if ( !fetchAttributes.contains( info.targetField ) )
Expand Down

0 comments on commit 3959f94

Please sign in to comment.