When I call WebhookDatabaseModel.create, I get the following error:
"error": "TypeError",
"cause": "{"errorType":"TypeError","errorMessage":"this.table.generate is not a function","trace":["TypeError: this.table.generate is not a function"," at Model.setDefaults (/var/task/index.js: 30056: 34)"," at Model.collectProperties (/var/task/index.js: 29940: 10)"," at Model.prepareProperties (/var/task/index.js: 29869: 20)"," at Model.putItem (/var/task/index.js: 29732: 25)"," at Model.create (/var/task/index.js: 29452: 27)"," at WebhookAccessor.create (/var/task/index.js: 32046: 47)"," at WebhookManager.create (/var/task/index.js: 32076: 47)"," at Runtime.executeCreate [as handler
] (/var/task/index.js: 32063: 32)"," at Runtime.handleOnce (file: ///var/runtime/index.mjs:548:29)"]}"
When I remove the "uuid: true" from "id", there is no error and everything works fine.
I have not given specific repro code becuase I do not have the time to brew up the mocks required and it's a pretty simple double blind test.
Create a working model that can call model.create fine
add a "uuid: true" to any property
watch the error return.
remove "uuid: true"
get a succesful creation
Environment (please complete the following information):
OS - Lambda
Node - NODE_JS_16x
OneTable Version - 2.3.8
TypeScript Version - 4.7.4
Describe the bug
Here is the simple schema being created:
Here is the table/model creation:
When I call WebhookDatabaseModel.create, I get the following error:
When I remove the "uuid: true" from "id", there is no error and everything works fine.
I have not given specific repro code becuase I do not have the time to brew up the mocks required and it's a pretty simple double blind test.
Environment (please complete the following information):
OS - Lambda Node - NODE_JS_16x OneTable Version - 2.3.8 TypeScript Version - 4.7.4