Hi,
I’ve got a case here where a WFS-T request ends up doing the UDPATE clause twice to the database table (using jdbc-oracle). This GeoServer that has a custom ResourceAccessManager that returns VectorAccessLimits. I’m using GeoServer 2.6.2, but I see no relevant updates to the code I’m referencing here in 2.6.x nor master.
Debugging this ended up me looking here: https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/security/decorators/SecuredSimpleFeatureStore.java#L60
The case I’m looking at ends up going to storeDelegate.modifyFeatures() twice, on rows #65 and #77.
I’ve copied the relevant statements below. If the first if statement is true, then writeQuery.getPropertyNames() is a constant (=null) that is always equal to Query.ALL_NAMES (=null). What’s the reasoning behind this? Is there a case where it makes sense for this method to do two updates?
Query writeQuery = getWriteQuery(policy);
if (writeQuery == Query.ALL) {
((SimpleFeatureStore) storeDelegate).modifyFeatures(names, values, filter);
} else if (writeQuery.getFilter() == Filter.EXCLUDE
writeQuery.getPropertyNames() == Query.NO_NAMES) {
throw unsupportedOperation();
}
// get the mixed filter
final Query local = new Query(null, filter);
Query mixed = mixQueries(local, writeQuery);
if (writeQuery.getPropertyNames() == Query.ALL_NAMES) {
// it was just a matter of filtering.
((SimpleFeatureStore) storeDelegate).modifyFeatures(names, values, mixed.getFilter());
} else {
…
Sampo
···
Sampo Savolainen
R&D Director, Spatineo Oy
sampo.savolainen@anonymised.com
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc
This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.