Does queryFeature parse the JSON response correctly?

2031
2
03-15-2013 07:42 AM
SimoneGadenz
New Contributor
Dear all,

I am experiencing a strange behavior of the queryFeature method of a Feature Layer.
The parsing of the JSON, that is returned valid and correct by the server, creates cloned features that were not present in the original JSON object.
From a first analysis the problem is limited to the features having the same objectid field, that in my case is not the primary key of the layer. I can understand if this is the reason, but several other layers having the same duplicated objectid do not present the same problem and are parsed correctly.
The error is better explained in the attached pdf.  

Hope somebody can help.

Cheers

Simone
0 Kudos
2 Replies
JohnGravois
Frequent Contributor
i definitely think the JavaScript API expects the values of the system managed ObjectID field to be unique, because our software ensures that the field is present and can act as a primary key for publishing both data in flat files and SDE.

i wish i had more insight or advice into what to do in your situation.
0 Kudos
SimoneGadenz
New Contributor
Thank you very much for prompt reply.

I thought the same but another feature layer I use the same way does not have this behavior.
What is the way to change the field defined as objectid? Should I act directly on the sde layer?

Cheers

Simone
0 Kudos