Hi,

We are working on a Frontend application, which adds new data to layers of
GeoServer. The Frontend is using WFS-T Insert calls to add this data. We
use views for these layers in GeoServer, to do some additional handling.
The views we use are database views thus created on our Oracle database
itself (e.g. we do not use the SQL Views of GeoServer). These layers based
on views work all fine (solution applied with a disabled “primary key” for
the view as described elsewhere on the internet).

The views we use contain an unique ID which is the unique ID of the
“principal” table which is used in the view. For the unique creation of the
ID’s for the “principal” table we chose to have the creation of this ID to
be done by a sequence defined in Oracle. For using this sequence within
GeoServer you can provide this “metadata” as indicated by the
documentation:
http://docs.geoserver.org/stable/en/user/data/database/primarykey.html

This solutions works fine, *except* when you use an (insert) trigger on the
database view, we have something like this:

*CREATE OR REPLACE TRIGGER OUR_VIEW_TRG*

*instead of insert or update or delete on vw_our_view*

*for each row….*

If we perform a WFS-T insert call this results in the following exception:

*org.geoserver.wfs.WFSTransactionException: Error performing insert: Error
inserting features*

*Error performing insert: Error inserting features*

*Error inserting features*

*ORA-22816: unsupported feature with RETURNING clause*

Without indicating GeoServer to use the sequence we get returned a feature
ID, which will not correspond with our sequence numbering on the ID of the
table (GeoServer simply returns the number of rows of the table, plus one).
This results in an undesired situation where we have an incorrect ID at the
Frontend after an WFS-T insert, only after a refresh of the browser the
correct ID is being fetched.

Does anybody know if there is a way to make this work, e.g. for our
customer changing the GeoServer code ourselves, and thus create our “own”
version of GeoServer is no option. Stop using the views would imply extra
WFS-T insert calls from our FrontEnd Application.

Kind regards,

Wiebe Geertsma
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to