emberjs/data — pull request #633 by sandstrom (2013-01-16 19:55:36+00:00)
Title: Set correct parent reference in `children.createRecord`

When using `hasManyChildren.createRecord` the new record isn't setup with a correct parent reference and when saving the record two POSTs are sent to the server.

*A related problem that remains is this: when modifying (or adding) an embedded record to an existing record saving won't result in a PUT for the parent record (containing the new or modified embedded child record). But I don't think a missing parent reference is the cause of that.*

Here are a few pull requests that may be related:
https://github.com/emberjs/data/pull/578 (half of 578 may be solved by this PR)
https://github.com/emberjs/data/pull/630
https://github.com/emberjs/data/pull/629

Credit to @NilsLattek for the test.