Documentation Improvements #453
Replies: 3 comments 3 replies
-
HI! It was quite hard for me to find how to define an array of objects in schema, I would appreciate having this documented in Readme. |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the feedback. I'll make an issue out of this suggestion. You can create an array property via:
If using TypeScript, you can then create a nested schema to type the array elements:
|
Beta Was this translation helpful? Give feedback.
-
Hi there, I had an issue today where I tried to perform a export const getModelsByIDs = async (ids: string[]): Promise<Model[]> => {
const batch = {}
for (const id of ids) {
await table
.getModel('Model')
.get({ pk: `model-${id}` }, { batch })
}
const result: Model[] = await table.batchGet(batch, { parse: true })
return result.map(parseModel)
} Apparently, OneTable automatically performs a Given that I seemingly just copied the example given in the documentation, this was quite confusing. Perhaps it would be a good idea to include a warning against combining |
Beta Was this translation helpful? Give feedback.
-
Please post here suggestions or requests for any documentation improvements.
Please cite the topic or page and what is lacking.
Beta Was this translation helpful? Give feedback.
All reactions