Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[BUGFIX] In WFS GetFeature joined fields not are not returned
In the WFS GetFeature Request, the joined fields are not returned. It's due to
 the use of provider instead of layer to retrieve all fields.

The correction is to use layer->pendingFields() and layer->pendingAllAttributesList()
  • Loading branch information
rldhont committed Mar 30, 2015
1 parent b6a4194 commit eb5717d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/server/qgswfsserver.cpp
Expand Up @@ -463,10 +463,12 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format

QgsFeature feature;
QgsAttributeMap featureAttributes;
const QgsFields& fields = provider->fields();
//const QgsFields& fields = provider->fields();
const QgsFields& fields = layer->pendingFields();

mWithGeom = true;
QgsAttributeList attrIndexes = provider->attributeIndexes();
//QgsAttributeList attrIndexes = provider->attributeIndexes();
QgsAttributeList attrIndexes = layer->pendingAllAttributesList();

QDomNodeList queryChildNodes = queryElem.childNodes();
if ( queryChildNodes.size() )
Expand Down Expand Up @@ -804,12 +806,14 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format

QgsFeature feature;
QgsAttributeMap featureAttributes;
const QgsFields& fields = provider->fields();
//const QgsFields& fields = provider->fields();
const QgsFields& fields = layer->pendingFields();

//map extent
searchRect = layer->extent();

QgsAttributeList attrIndexes = provider->attributeIndexes();
//QgsAttributeList attrIndexes = provider->attributeIndexes();
QgsAttributeList attrIndexes = layer->pendingAllAttributesList();
if ( mPropertyName != "*" )
{
QStringList attrList = mPropertyName.split( "," );
Expand Down

0 comments on commit eb5717d

Please sign in to comment.