[Geoserver-devel] [JIRA] (GEOS-9338) WFS-T is not working anymore with oracle updatable view

Paulo Aragão created an issue

GeoServer / BugGEOS-9338

WFS-T is not working anymore with oracle updatable view

Issue Type:

BugBug

Affects Versions:

2.15.1

Assignee:

Unassigned

Components:

Oracle, WFS

Created:

18/Sep/19 1:04 PM

Priority:

HighestHighest

Reporter:

Paulo Aragão

Hello dears,
previously I was working with geoserver 2.11.2 using WFS-T with oracle updatable view.
But now in the version 2.15.1 it is not working anymore. I am getting the exception:
ERROR [org.geoserver.ows] - org.geoserver.wfs.WFSTransactionException: {http://www.opengeospatial.net/cite}TESTVIEW is read-only

To working with oracle updatable view, I follow the steps:
a) create the view:
CREATE VIEW TESTVIEW AS
SELECT a.ID, foo.somefield, a.some_other_id, a.GEOMETRY
FROM FOO foo, AREA a
WHERE foo.ID = a.SOME_OTHER_ID;

b) create the trigger on this view to accept “update” statement:
CREATE OR REPLACE TRIGGER AREA_INSERT
INSTEAD OF INSERT ON TESTVIEW
REFERENCING NEW AS n
FOR EACH ROW
BEGIN
insert into area (id, some_other_id, geometry) values (:n.ID, :n.some_other_id, :n.geometry);
END;
/

c) insert in sdo_geom_metadata
insert into USER_SDO_GEOM_METADATA (table_name, column_name, diminfo, srid)
values ('TESTVIEW ',
‘GEOMETRY’,
SDO_DIM_ARRAY
(
SDO_DIM_ELEMENT(‘X’,50199, 761274,0.5),
SDO_DIM_ELEMENT(‘Y’,6582464, 7799839,0.5)
),
3047);

d) create “disable” primary key on the view:
alter view TESTVIEW add constraint TESTVIEW_PK primary key (ID) disable;

So, if I do all the steps below on geoserver 2.11.2 it will work.
If I miss the step (d) above, I have the “read-only” exception. So, this step (d) is needed

But now in the version 2.15.1 it is not working anymore if I execute all the steps above.
Some changes was done in the oracle-plugin?

I will apreciate if anyone can check this problem!!!

Many Thanks guys!!!

Paulo

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100109-sha1:a5a9be4)

Atlassian logo