-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
Description
client.query(WOQL.insert_document(WOQL.doc( json-as-per-GeoPolygon-example)))
yields
"data": {
"api:message": "Error: unrecognized_property(\"GeoPolygon\",coordinates,json{'0':json{'0': -6.3491535,'1':53.3700669},....
Note that the example json had to be changed (i.e. bug in doc) from "@id": "PhoenixPark" to "GeoPolygon/PhoenixPark" in both the above and the following:
client.addDocument( json-as-per-GeoPolygon-example) works
Thanks to Fidelio for pointing this out.
To Reproduce
Schema:
{
"@id" : "GeoPolygon",
"@type" : "Class",
"name" : "xsd:string",
"coordinates" :
{
"@type" : "Array",
"@dimensions" : 2,
"@class" : "xsd:decimal"
}
}
const json-as-per-GeoPolygon-example =
= {
"@id" : "GeoPolygon/PhoenixPark",
"@type" : "GeoPolygon",
"name" : "The Pheonix Park",
"coordinates" :
[
[
-6.3491535,
53.3700669
],
[
-6.3364506,
53.3717056
],
[
-6.349411,
53.3699645
]
]
};
client.query(WOQL.insert_document(WOQL.doc(const json-as-per-GeoPolygon-example)))
Expected behavior
insert succeeds and instance with array is available for query in db
Error logs
"data": {
"api:message": "Error: unrecognized_property(\"GeoPolygon\",coordinates,json{'0':json{'0': -6.3491535,'1':53.3700669},....
System information (please complete the following information):
- OS: Ubuntu 20.04
- NodeJS version 14.19.1
- terminus-client 10.0.10
- terminusdb 10.0.25
- typescript 4.6.2