-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array of Objects as type #55
Comments
+1 I have similar problem. How do we solve this? @clarkie any suggestions? |
The way to do this with Joi would be something like Joi.object().keys({
// other stuff
markedLocations: Joi.array().items(
Joi.object().keys({
latitude: Joi.string(),
longitude: Joi.string(),
// etc
})
)
}) Note that DynamoDB does not store empty arrays or empty objects, so if you try to store |
And what if these markedLocations where in a different table? |
No. Dynogels is not an object-relational mapper. |
Agreed |
Thanks for dynogels. It's simply amazing. Impressed with the kind of coverage that it gives.
Is there a way to define JSON data type? or should we use string() type instead?
This is my scenario-
I need to build a DB with schema(rather example) that looks something like-
So, I basically need to know how do I hold values in the 'MarkedLocations' array? The array has to hold objects in it.
Updating the object's attributes(say updating latitude,longitude) and adding more objects to the array has to be possible.
Please can you suggest how do I achieve this?
The text was updated successfully, but these errors were encountered: