|
From: gershwinou <ger...@gm...> - 2007-09-01 07:04:16
|
Thanks Andrea, The problem is that i don't get the feature from the featurestore. I get it from somewhere else. So i have to find somehow which feature i have to update in the datastore. Since all fields can have changed, my only key to fetch the right feature is fid... But something has become clear now... I guess i have to use some fidfilter, get the feature and apply update... is that the right way? however, since this is postgis versioned primary key is gid+revision, if i apply update i guess i will have the updated feature with the same revision, right? but i want a new revision number, otherwise using versioning is useless... so somehow i have to insert a new one with a gid that is the same as the previous version of the feature... That is more complicated... gersh On 31/08/2007, Andrea Aime <aa...@op...> wrote: > > gershwinou ha scritto: > > Hi all, i was on geoserver list but i think this is more a geotools > > question: > > > > I am using postgis-versioning datastore, and this ok for now. > > Issue: > > - I parse myself some incoming featured (from kml format) and thanks to > > the last build of geoserver, the kml contains the fid, so I know which > > features are to be updated. > > - I try to create features against the postgis schema. The problem is > > that i can't set the fid (the method is protected). Is that a design > > choice (from what i have read in the archive: yes)? > > When you create a feature you can set the FID, you do this when calling > FeatureType.create(attributes, fid) to create the feature. > > Anyways, if you want to update a feature, you don't have to create a > new one, but issue an update on the feature store. The fid will > be disregarded when you're inserting a feature, a new one will be used. > Hope this helps. > > Cheers > Andrea > |