Object has too many fields when importing values with nested objects
I have a complex object structure defined as my schema, and one of the column values is a mapping from city names to numbers. Sometimes there are a lot in there so I end up exceeding the maximum number limit. any suggestions on how to work around this?
My immediate thought would be to JSON.stringify the complex columns and store as a string to deserialize on the client...
5 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
If you really need to interact with the data as nested data directly in the db, a workaround is worth looking into, but if you can do what you're doing while storing it as a string, store it as a string.
I just need to store it for retrieval but never quering into the json. Is the recommended method to nest JSON.stringify it then?
That's how Convex's prosemirror sync component stores the nested document object. Just stringify in the browser and keep it that way until retrieval.
cool thank you!