on 2024 Jan 10 11:25 AM
I have the following schema for a CAPM application in nodejs.
I have the following schema for a dummy CAPM application in nodejs.
entity Orders : managed {
key id : UUID;
name : String;
description : String;
total_amt : Decimal(7, 2);
orderItem : Composition of many OrderItems
on orderItem.order = $self;
}
entity OrderItems : managed {
key id : UUID;
description : String;
amount : Decimal(7, 2);
quantity : Int16;
order : Association to Orders;
item : Composition of Books
on item.orderItem = $self;
}
entity Books : managed {
key id : UUID;
name : String;
isbn : String;
author : String;
publisher : String;
price : Decimal(7, 2);
currency : Currency;
orderItem : Association to OrderItems;
}
It has 3 layers of parent-child relationship. Following is the POST request body.
{
"name": "hgf",
"description": "ono",
"total_amt": 20.00,
"orderItem": [
{
"description": "iu",
"amount": 10.00,
"quantity": 2,
"item": {
"name" : "muk7i",
"isbn" : "ryh",
"author" : "ewfewf",
"publisher" : "qwdq",
"price" : 10.00,
"currency" : "INR"
}
},
{
"description": "mj",
"amount": 10.00,
"quantity": 1,
"item": {
"name" : "i8nty",
"isbn" : "wdqedd",
"author" : "465g",
"publisher" : "rb4",
"price" : 5.00,
"currency" : "INR"
}
}
]
}
after firing the POST request I get the following error:
{
"error": {
"code": "400",
"message": "Deserialization Error: Value for structural type must be an object."
}
}
What could be the cause of this error? My guess is that I am not correctly defining multi-level relationships between entities.
Error is in data
"currency" :{"code":"INR"}
instead of "currency" : "INR"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Dinu!
We are working with Cap project and Build Process automation , in which we are trying to post data to Hana Cloud DB .
we are facing the same issue. we are using actions in BPA to post data.
our Request Payload structure is this .
we are facing this issue.
could you provide any input regarding this, till few days ago it worked fine with the same payload suddenly we are getting error.
Many Thanks in advance.
Best Regards,
Kunal
User | Count |
---|---|
70 | |
10 | |
9 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.