Use fid of feature if provided
------------------------------
Key: GEOS-1427
URL: http://jira.codehaus.org/browse/GEOS-1427
Project: GeoServer
Issue Type: New Feature
Components: Transactions/Locking
Affects Versions: 1.6.0-beta3
Reporter: Sébastien Geindre
Assignee: Andrea Aime
Fix For: 1.6.0-beta4
Hmmm... usually people do use an automatically generated primary key,
but in this case you're trying to provide one. I'm not sure the wfs 1.0
specification supports this, wfs 1.1 talks about it but again I'm
not sure we're bound to support this use case by the spec.
Anyways, if the gml parser sets the fid in the feature, it would just
be a matter of modifying the BasicFidMapper class in Geotools to use
the fid provided in the feature. Justin, do you have the information
I miss at your fingertips?
Nope, I think you have it right andrea. There is nothing in the spec
that says that those ID's must be used to used as the id's to persist
the feature, as its storage dependent.
Would not using the ID specified by the user be tricky? I guess its
doable... although some additional checks for uniqueness and all that
would have to be performed.
It should be doable and relatively easy. If the xml parser generates
a feature with the id that the user specified, we just need to change
the basic fid mapper. The database will make sure the value is unique.
What do you think?
Yeah, seems logical. The parser already uses the id to create the
feature. What will be the behavior when a bad fid is encountered. Just
ignore it? Or throw exception? I think to be spec compliant we will just
have to ignore it and generate a warning.
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira