lolmaus / ember-cli-stained-by-children

Ember CLI addon: a mixin that makes the `isDirty` property of a record respect the dirtiness of its belongsTo/hasMany children
MIT License
25 stars 6 forks source link

Fix for clean-embedded-children in Ember Data 1.0.0-beta.19.2 #12

Closed melindaweathers closed 8 years ago

melindaweathers commented 9 years ago

Fix for https://github.com/lolmaus/ember-cli-stained-by-children/issues/11

I verified that this fixes the tests for beta 19.2 (and that they are broken without it)

lolmaus commented 9 years ago

Thank you for your kind effort, @melindaweathers.

I confirm that tests fail in modern Ember Data and your fix makes them pass again.

For me to accept your PR, please do the following:

  1. Use the latest stable Ember Data version available.
  2. Squash your commits into one.

PS So happy to receive a legit PR for my addon! :heart_eyes:

melindaweathers commented 9 years ago

Ember-data 1.13.4 looks like the latest stable version as per https://github.com/emberjs/data/blob/master/CHANGELOG.md, but I'm not having much luck getting the tests to run on that version unfortunately.

lolmaus commented 9 years ago

Hmm, tests do work for me, though there's strange delay.

lolmaus commented 9 years ago

Ah, I'm wrong. One of the tests would stall forever in the ember test mode. And in ember s mode the test GUI displays an error:

Uncaught TypeError: serializer.get is not a function

coming from Ember Data.

This seems to be a fixed bug in Ember Data, see this commit.

So we might need to wait for another Ember Data release.

Also, there's quite a number of deprecations which should be fixed in order to release an up-to-date version of Stained.

Unfortunately, I will not get to work on it anywhere soon, currently stuck in a messy Angular project. :(

melindaweathers commented 9 years ago

Yeah, I was hitting the serializer.get error. Waiting for a new version of ember-data sounds like a good idea.

I'll go ahead and squash my commits incase you wind up wanting to pull them in to work with the beta-19 series. If not, I'll try and take another swing at it when the new version comes out!