I have defined a class 'Box' in OrientDB using the schema manager in studio. 'Box' has only one element - an embedded class 'Label'.
When I use this json to create a label
{
"@class": "Label",
"boxUUID": "azxc",
"validFrom": 0,
"validTo": 100
}
in a POST command to 'Label', the insert works.
But when I use it as below in a POST to 'Box' it fails.
{
"@class": "Box",
"Label": {
"boxUUID": "azxc",
"validFrom": 0,
"validTo": 100
}
}
With the following error message:
{
"errors": [
{
"reason": 500,
"content": "com.orientechnologies.orient.core.exception.OValidationException: The field 'Box.Label' has been declared as EMBEDDED but an incompatible type is used. Value: {boxUUID=azxc, validFrom=0, validTo=100}",
"code": 500
}
]
}
What is the correct format of the json for a class with an embedded class in OrientDB over the HTTP API?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.