[Geoserver-devel] [JIRA] (GEOS-8042) WFS-T Insert FeatureIds being returned in incorrect order

Jody Garnett [Administrator] created an issue

GeoServer / BugGEOS-8042

WFS-T Insert FeatureIds being returned in incorrect order

Issue Type:

BugBug

Affects Versions:

2.9.4, 2.10.2, 2.11-RC1

Assignee:

David Blasby

Components:

WFS

Created:

21/Mar/17 7:34 PM

Environment:

From Dave Blasby on geoserver-devel:

I was looking at the WFS-T response for Inserts (it’s a list of FIDs). The spec says these should be in the same order as the features in the request’s Insert elements.

However, I’m seeing these in a “strange” order. I think I’ve tracked it down to the DefaultFeatureCollection implementation. This stores the features in a SortedMap<String, SimpleFeature>, and the iterator just returns them in the text-natural-id-order (ie. “new0”, “new1”, “new11”, “new2”, “new3”,… – “new11” is in the wrong order). This messes up the order of the new fids for the inserted features.

Here’s it using the DefaultFeatureCollection;
https://github.com/geoserver/geoserver/blob/2.9.x/src/wfs/src/main/java/org/geoserver/wfs/InsertElementHandler.java#L98

and the passing it (incorrectly ordered) off to the underlying datastore;
https://github.com/geoserver/geoserver/blob/2.9.x/src/wfs/src/main/java/org/geoserver/wfs/InsertElementHandler.java#L189

Here’s the DefaultFeatureCollection implementation;
https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/feature/DefaultFeatureCollection.java#L330

Priority:

MediumMedium

Reporter:

Jody Garnett [Administrator]

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.824.3#100035-sha1:74ec649)

Atlassian logo