-
Notifications
You must be signed in to change notification settings - Fork 51
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
Relationships are not persisted correctly #62
Comments
@igorsantos07 Any updates on this? |
None. I'm focusing on other parts of my project for awhile, hoping the maintainer will take a look at this weird bug. |
It would be great if you could share the code for describing your models. Then it would be possible to trace why your column is set to relation as oppose to pointer |
Hypothesis = DS.Model.extend
customer: DS.belongsTo 'item', async: true
problem: DS.belongsTo 'item', async: true
solution: DS.belongsTo 'item', async: true
risk: DS.belongsTo 'item', async: true
method: DS.attr 'string'
criterion_total: DS.attr 'number'
criterion_valid: DS.attr 'number'
criterion_invalid: DS.attr 'number'
status: DS.attr 'boolean', defaultValue: null
text: DS.attr 'string' |
Hey, I think I accidentally found the issue! The problem lies in the type of relations I'm creating at Parse. |
I'm fixing my relations in my models and Parse tables. It seems it was a conflict of types. However, this surfaces an important stuff: we need clear documentation on what Ember relations are what Parse relation types. Also, would be cool to see a clearer error message (example: in case someone uses one-to-many in Ember and |
When trying to store a relationship in Parse I get the following 111 error in the HTTP response:
invalid type for key customer, expected relation<Item>, but got "Item"
The payload sent includes a
customer
key with this object:{ __type: "Pointer", className: "Item", "objectId": "D2zBq..." }
That was made through the console, with the following code just for the purpose of testing how things work:
I guess the adapter is not correctly naming relationship objects before sending?
The text was updated successfully, but these errors were encountered: