deegree / deegree3

Official deegree repository providing geospatial core libraries, data access and advanced OGC web service implementations
https://www.deegree.org
GNU Lesser General Public License v2.1
150 stars 99 forks source link

wfs:Update error #567

Open larseggan opened 9 years ago

larseggan commented 9 years ago

I have set up a WFS-Transaction server with deegree 3.3.14 (SQL Feature store, WFS 2.0.0). A wfs:Update on a datatype with multiplicity 0..* adds a new node (a new row in the database in the table ad_address_ad_position) instead of updating an existing one. I have tested on INSPIRE Addresses, using the INSPIRE example data, and the transaction in the file "Update_replace2_200.xml":

<wfs:Update typeName="ad:Address">
    <wfs:Property>
      <wfs:ValueReference action="replace">ad:position</wfs:ValueReference>
      <wfs:Value>
        <ad:GeographicPosition>
          <ad:geometry>
            <gml:Point gml:id="AD_ADDRESS_c9344dc5-35a8-4425-a858-7f84d7eea2e1" srsName="urn:ogc:def:crs:EPSG::4258">
              <gml:pos>49 11</gml:pos>
            </gml:Point>
          </ad:geometry>
          <ad:specification>exit</ad:specification>
          <ad:method>byOtherParty</ad:method>
          <ad:default>false</ad:default>
        </ad:GeographicPosition>
      </wfs:Value>
    </wfs:Property>
    <fes:Filter>
      <fes:ResourceId rid="AD_ADDRESS_c9344dc5-35a8-4425-a858-7f84d7eea2e1" />
    </fes:Filter>
  </wfs:Update>
</wfs:Transaction>

Thanks, Lars

tfr42 commented 9 years ago

Thanks for posting. I hope you don't mind that I fixed the formatting for the given XML. Can you please indicate what behavior you expect? This will help to decide if this is a bug report or not.

larseggan commented 9 years ago

I would expect that the existing ad:Position (in table ad_address_ad_position) was updated, not that I got a new row in this table. I tried modifying the ValueReference like this, but still a new row was inserted:

<wfs:ValueReference action="replace">ad:position[1]</wfs:ValueReference>