-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Can't save parent record in a hasMany/belongsTo relationship #1750
Comments
To see what happens when you click a button, open the JavaScript console. |
@stuporglue what version of ED are you using? |
I'm using v1.0.0-beta.5. I think it's related to the discussion here which links to this pull request. When I modify serializeHasMany to also check for relationshipType === 'manyToOne' my test cases start working. |
You should probably be defining the adapter like so: MF.ApplicationAdapter = DS.FixtureAdapter; The |
This problem has been plaguging me for a while, too, and others: |
This appears to be caused by JSONSerializer's serializeHasMany function not serializing manyToOne relationships: 7f752ad. Would the best choice of action here be to implement a custom serializer for the FixtureAdapter? |
When I have objects with a hasMany <--> belongsTo relationship I can't save the parent object. Saving causes it to lose track of its child objects.
I am using the Fixture adapter.
I have tried several things, you can see them here: http://stuporglue.github.io/saving_ember_data/nodirty.html
The objects are as follows:
When I do any of the following, the Parent forgets about its children:
The text was updated successfully, but these errors were encountered: