我希望Fiware-Orion自动生成实体ID

问题描述 投票:0回答:1

如何在 Fiware-Orion 中为多部智能手机提交的匿名报告创建实体,而我无法控制实体 ID?我希望 Fiware-Orion 自动生成实体 ID,但我遇到了它无法按预期工作的问题。

我使用的 Fiware-Orion 版本是 3.7.0,它的运行详细信息如下:

Uptime: 2 days, 7 hours, 13 minutes, 24 seconds
Git Hash: 8b19705a8ec645ba1452cb97847a5615f0b2d3ca
Compile Time: Thu May 26 11:45:49 UTC 2022
Compiled By: root
Compiled In: 025d96e1419a
Release Date: Thu May 26 11:45:49 UTC 2022
Machine: x86_64
Documentation: Fiware-Orion Documentation
Library Versions:
    boost: 1_74
    libcurl: libcurl/7.74.0 OpenSSL/1.1.1n zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3
    libmosquitto: 2.0.12
    libmicrohttpd: 0.9.70
    openssl: 1.1
    rapidjson: 1.1.0
    mongoc: 1.17.4
    bson: 1.17.4

发布 { "type": "投诉", “description”:“投诉的简短描述”,

“创建日期”:{ “类型”:“日期时间”, “值”:“2023-07-26T12:34:56.789Z” }, “地点”: { “类型”:“地理:json”, “价值”: { “类型”:“点”, “坐标”:[-46.73004,-23.55469] } }, “图像”:“SGVsbG8gV29ybGQh”, “设备ID”:“012edf4”, “autoAssignId”:true }

返回: { “错误”:“错误请求”, "description": "实体 ID 长度:0,支持的最小长度:1" }

fiware-orion
1个回答
0
投票

简单的解决方法是在客户端生成实体 ID。如果您不需要特定的ID,您可以随机生成它。

© www.soinside.com 2019 - 2024. All rights reserved.