Skip to content
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

Some additional work on the adapter / compatibility with the last ember-data release #1

Merged
merged 16 commits into from
Mar 4, 2015

Conversation

Kira2
Copy link

@Kira2 Kira2 commented Mar 4, 2015

Hi,

I work on an Ember project that needs to communicate with the Parse background. I found this adapter, and saw that it was poorly maintained, until your last commits. Great job ! I made some additional work that might interest you. I tried to detail every changes into my comments to make it clear. I'm very busy with my project, but feel free if you have any question, I will do my best to answer you as quick as possible. Here are the main changes:

  • some changes on normalization and serialization for the relations hasMany and belongsTo
  • some bug fixes
  • removed "400 bad request error" from Parse when send an empty array to represent a relation
  • removed some deprecation warnings

Thank you.
Emilie.

Kira2 added 16 commits February 21, 2015 14:10
stringify the link object because ember-data expects a string / replace
the Parse returned object with an empty array into the data of the
relationship, because ember-data expects for nothing or an array of ids
of records to retrieve
…hot" to be sync with the last ember-data specifications
… due to a bad read of the ember-data document example. Here, we do not create the attribute "attributes" into "json" object, we just delete the protected Parse keys
…hot" to be sync with the last ember-data specifications
…napshot.attr(key)" call due to an undefined function. So, keep the same logic into the overridden functions "createRecord" and "updateRecord" than in base class of ember-data, as the serializer works now with the snapshot (see ember-data-1.0.0-beta15 changelog).
… due to a bad read of the ember-data document example. Here, we do not create the attribute "attributes" into "json" object, we just delete the protected Parse keys
…To(key, { id: true }) logic to get the primary key
…ks" object was reinitialized at each iteration on the relations of the object, so only the last relation was correctly normalized with its link
…to JSON to be correctly parse into findHasMany function
…g. when call store.find('person', {name: 'John'}) / updated tests
@joshfester
Copy link
Owner

Thanks Emilie! This looks great. I was starting to feel very alone with this adapter. It looks like this will make it fully compatible with ember-data-1.0.0-beta.15. You're awesome!

joshfester added a commit that referenced this pull request Mar 4, 2015
Some additional work on the adapter / compatibility with the last ember-data release
@joshfester joshfester merged commit fc1f991 into joshfester:master Mar 4, 2015
@Kira2 Kira2 deleted the beta branch March 4, 2015 23:51
@Kira2
Copy link
Author

Kira2 commented Mar 4, 2015

Thank you. I'm glad if it could help ^^

joshfester pushed a commit that referenced this pull request Aug 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants