I'm trying to modify a feature in a WFS insert transaction using the Geoserver Scripting Extension with python. Basically I'm able to change the feature attributes, but I'm unsure of how to pass this feature along the pipeline so that the modified attributes will end up in the database.
def preInsert(inserted, req, context): iterator = inserted.features() while iterator.hasNext(): feature = iterator.next() feature.setAttribute('userid', 'placeholder')
The above code doesn't have the userid field populated once it gets to the database.
Really I'm just confused as to whether or not I need to return something from these hook functions or if I'm allowed to mutate the objects themselves because the documentation is sparse and examples are few and far between.