Hi,
looking at the transaction code in Geoserver I found a
comment that prompted me to look at the WFS specification
about how inserted feature fids are returned.
The specification states:

The <InsertResult> element contains one or more feature identifiers of 
newly created feature instances. One <InsertResult> element is reported 
per <Insert> element in the request. The insert results are reported in 
the order in which the <Insert> operations were contained in the 
<Transaction> element. Additionally, they can be correlated using the 
handle attribute if it was specified.

Now, Geoserver uses FeatureStore.addFeatures(xxx) to add features
into the datastore, which returns a Set. The Set is usually
implementd using an HashSet, which is not insertion order preserving,
meaning that in the end we're not satisfying the WFS spec
(I guess no cite test makes sure proper fid insertion order is satisfied).

Uarg, this seems to me like a major issue. We can solve it easily
in Geoserver by switching back to the FeatureWriter API (getting
an append feature writer), but it suprise me a little since the
DataStore API was inspired by WFS no?

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to