Open vkarpov15 opened 1 day ago
@vkarpov15 I cannot reproduce your error, here is the command I tried in Postman, and I just reformat your content. Could you double-check if it's the thing you want? Create Table:
{
"createTable": {
"name": "orders",
"definition": {
"primaryKey": "_id",
"columns": {
"_id": {
"type": "text"
},
"total": {
"type": "decimal"
},
"name": {
"type": "text"
},
"paymentMethod": {
"type": "map",
"keyType": "text",
"valueType": "text"
},
"items": {
"type": "list",
"valueType": "text"
}
}
}
}
}
Insert one:
{
"insertOne": {
"document": {
"items": [
"{\"productId\":\"673e4cc615d317995d5ceb12\",\"quantity\":1}"
],
"total": 799,
"name": "Stripe Test",
"paymentMethod": {
"id": "test-stripe-payment-method-id",
"brand": "visa",
"last4": "0000"
},
"_id": "673e4d76aedcce42399ec417"
}
}
}
Result from insert one:
{
"status": {
"primaryKeySchema": {
"_id": {
"type": "text"
}
},
"insertedIds": [
[
"673e4d76aedcce42399ec417"
]
]
}
}
Running data-api v1.0.20 locally, I created an
orders
table as follows:When I try to run the following
insertOne
:I get back:
Am I doing something wrong here?