Skip to content

Order in which navigationLinks are handled should be configurable by plugins #2143

@matthijskooijman

Description

@matthijskooijman

I followed the steps to set up a docker instance at https://fraunhoferiosb.github.io/FROST-Server/deployment/docker.html, which gives a running FROST server. Then I tried inserting the demoEntities.json file. At first it failed because the default compose file has plugins_multiDatastream.enable=false, which I fixed by flipping that to true. Then:

❯ curl -X POST -H "Content-Type: application/json" -d @demoEntities.json http://localhost:8081/FROST-Server/v1.1/Things
{"code":400,"type":"error","message":"Size of result array (2) must match number of observed properties (0) in the MultiDatastream."}

I took a quick glance at the relevant code:

Integer count = pm.getDslContext()
.selectCount()
.from(tableMdsOps)
.where(((TableField) tableMdsOps.getMultiDatastreamId()).eq(mdsId))
.fetchOne().component1();
if (count != list.size()) {
throw new IllegalArgumentException("Size of result array (" + list.size() + ") must match number of observed properties (" + count + ") in the MultiDatastream.");

I suspect that there might be an ordering issue here with deep inserts, where the observedProperties are not added (or not committed) to the database yet when the observations are added, but I am not at all familiar with the code, so did not dig further than this.

If I leave out the observations from the MultiDataStream, the data inserts as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions