I have a question related to the Update method, in case the feature doesn't exists, the update method will generate a new feature? (i.e. will behave as Insert)?

Or maybe, in contrast, an insertion using an existing fid (feature id) will perform an update over this feature?

Thanks in advance.

2 Answers 2


Just testes with a recent Geoserver 2.5 snapshot - update request with a fid that does not exist does not create a new feature - default fid handling in Geoserver is that server is creating the fid; it is taken from a sequence or if sequence is not defined the new fid will be Max(fid)+1.

Conclusion: Update does not behave as Insert, not Insert as Update. If you see such happening with Geoserver it is worth sending mail to geoserver-users mailing list because probably it is a bug.


The standard leaves that somewhat open to interpretation, although I would never expect an Update to result into an Insert or an Insert resulting in an Update. Especially in cases where the data is stored in a database this sort of behaviour is awkward and would require a good deal of extra code to implement.

To an Update on a non-existing feature I would expect an InvalidValue exception; to an Insert with an existing fid I would expect to get DuplicateStoredQueryIdValue. But each server implementation may respond in different ways.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.