-
Notifications
You must be signed in to change notification settings - Fork 20
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
Support for JSONB, other nested data structures #45
Comments
I made some specs to reproduce but they passed. Can you post the resource class definition? |
This is the real thing: import resourceLibrary from './library'
class Car extends resourceLibrary.Base {
static define() {
this.attributes('year', 'prices')
this.belongsTo('engine')
this.belongsTo('make')
this.belongsTo('model')
}
}
export default resourceLibrary.createResource(Car); As a temporary workaround for this I've decided to call myResourceInstance.update({
jsonField: JSON.stringify({stuff: 1234})
}) And setup a |
|
@nicklandgrebe my example didn't match the real-world definition of the resource itself. My bad. In the real example |
If instead of using |
@nicklandgrebe I'll test it out either today or tomorrow and get back to you. 👍 |
My backend server is using PostgreSQL as a DB.
For a specific field in my model, I have a JSONB column.
When I call:
Then the update reaches my server without this parameter (basically it updates the model instance without any actual changes).
If I instead send some other primitive data type as the value of
jsonField
then I can see it come through in the request's parameters.Any ideas how to make this work, without moving away from the JSON:API standard in my server?
The text was updated successfully, but these errors were encountered: