Open jason-fox opened 6 days ago
Orion 1.6 - I have a context broker and a context provider. The context provider returns two properties:
{ "id": "urn:ngsi-ld:Animal:cow001", "type": "Animal", "heartRate": { "type": "Property", "value": 10.4, "unitCode": "5K", "observedAt": "2024-02-02T15:00:00.000Z", "providedBy": { "type": "Relationship", "object": "urn:ngsi-ld:Device:cow001" } }, "location": { "type": "GeoProperty", "value": { "type": "Point", "coordinates": [13.404, 52.47] }, "observedAt": "2024-02-02T15:00:00.000Z", "providedBy": { "type": "Relationship", "object": "urn:ngsi-ld:Device:cow001" } } }
If I create an exclusive registration with both propertyNames:
propertyNames
curl -L 'http://localhost:1026/ngsi-ld/v1/csourceRegistrations/' \ -H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \ -H 'Content-Type: application/json' \ -d '{ "type": "ContextSourceRegistration", "information": [ { "entities": [ { "type": "Animal", "id": "urn:ngsi-ld:Animal:cow001" } ], "propertyNames": [ "heartRate", "location" ] } ], "mode": "exclusive", "operations": [ "retrieveOps" ], "endpoint": "http://context-provider" }'
If I now query for both attributes using attrs :
attrs
curl -L 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Animal:cow001?attrs=location%2CheartRate' \ -H 'Accept: application/json' \ -H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
Only one of the two attributes is returned. The returned attribute appears to be random.
Note that if I separate the exclusive registration into two separate registrations, both attributes are returned correctly. Similarly if attrs filtering is not present both attributes are returned.
Orion 1.6 - I have a context broker and a context provider. The context provider returns two properties:
If I create an exclusive registration with both
propertyNames
:If I now query for both attributes using
attrs
:Only one of the two attributes is returned. The returned attribute appears to be random.