Closed jkerr5 closed 5 years ago
No, we actually made a conscious decision to include both the field specified by idField
as well as add an OBJECTID
field (release 2.11.0 from this PR) . We observed some buggy behavior with some ArcGIS clients when the OBJECTID
field was missing and had the most reliable behavior when it was always present - so we opted for Koop/FeatureServer to include both the idField
and OBJECTID
.
What if clients pass in a where clause with OBJECTID? The provider would need to have special logic looking for the OBJECTID column to map it to the ID column. This seems like a behavior that pass-through providers should be able to control as it is really changing what columns the client think are available.
On Sun, Oct 14, 2018, 4:24 AM Rich Gwozdz notifications@github.com wrote:
No, we actually made a conscious decision to include both the field specified by idField as well as add an OBJECTID field (release 2.11.0 https://github.com/koopjs/FeatureServer/releases/tag/v2.11.0 from this PR https://github.com/koopjs/FeatureServer/pull/96) . We observed some buggy behavior with some ArcGIS clients when the OBJECTID field was missing and had the most reliable behavior when it was always present - so we opted for Koop/FeatureServer to include both the idField and OBJECTID.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/koopjs/FeatureServer/issues/127#issuecomment-429590881, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP8AtS5ZCy4z2OFhY8yVv4kTSzy_aeZks5ukqBwgaJpZM4Xa5Km .
Yup, you've identified a flaw that needs to be addressed. At minimum we need Winnow to be processing WHERE
s with OBJECTIDs properly when idField
determines its value. While addressing this, we might be able to take a deeper dive and see if we can avoid the workaround noted above.
@jkerr5 - this is now fixed in FeatureServer 2.16.3 and Winnow 1.16.5. If you set an idField
in metadata, that will be used as the objectIdField
in ArcGIS clients; a duplicate field named OBJECTID
is no longer added.
Thanks again for bring this back to my attention.
Thanks Rich!
On Wed, Nov 28, 2018, 9:03 PM Rich Gwozdz notifications@github.com wrote:
Closed #127 https://github.com/koopjs/FeatureServer/issues/127.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/koopjs/FeatureServer/issues/127#event-1993459013, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP8AshGsnnJRQgDoaeBrIg3CGFG2KXNks5uzuv-gaJpZM4Xa5Km .
Even if the
metadata
specifies anidField
, it looks like theOBJECTID
field is still added to the list of fields.I think I have traced it back to here in the code https://github.com/koopjs/FeatureServer/blob/4515bedde61b9e4c6bf68737554f304d04da048c/src/field/index.js#L27
It should be looking for the field that the metadata says is the
idField