Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBJECTID field is always added #127

Closed
jkerr5 opened this issue Oct 14, 2018 · 5 comments
Closed

OBJECTID field is always added #127

jkerr5 opened this issue Oct 14, 2018 · 5 comments
Assignees
Labels

Comments

@jkerr5
Copy link

jkerr5 commented Oct 14, 2018

Even if the metadata specifies an idField, it looks like the OBJECTID field is still added to the list of fields.

I think I have traced it back to here in the code

if (!_.find(responseFields, {'name': 'OBJECTID'})) responseFields.push({name: 'OBJECTID'})

It should be looking for the field that the metadata says is the idField

@rgwozdz
Copy link
Member

rgwozdz commented Oct 14, 2018

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.

@jkerr5
Copy link
Author

jkerr5 commented Oct 14, 2018 via email

@rgwozdz rgwozdz self-assigned this Oct 15, 2018
@rgwozdz rgwozdz added the bug label Oct 15, 2018
@rgwozdz
Copy link
Member

rgwozdz commented Oct 15, 2018

Yup, you've identified a flaw that needs to be addressed. At minimum we need Winnow to be processing WHEREs 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.

@rgwozdz
Copy link
Member

rgwozdz commented Nov 28, 2018

@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.

@rgwozdz rgwozdz closed this as completed Nov 28, 2018
@jkerr5
Copy link
Author

jkerr5 commented Nov 28, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants