clintjhill / ember-parse-adapter

An Ember Data Adapter for Parse
http://clintjhill.github.com/ember-parse-adapter
MIT License
190 stars 53 forks source link

Breaks on latest version of Ember Data #102

Open derrickshowers opened 9 years ago

derrickshowers commented 9 years ago

When using the latest version of Ember Data (1.13.8), the initializer breaks and displays the following error in the console.

Uncaught Error: Assertion Failed: Passing classes to store methods has been removed. Please pass a dasherized string instead of learn-me@model:parse-user:

Appears that others have had similar issues. I downgraded back to 1.0.0-beta.18, but with Ember 2.0 just being released, this is probably worth taking a look at.

maxKimoby commented 9 years ago

Hey can you update me on what's going on with this issue? I keep having it with ember 2.0 and ember-data 2.0.1 when using nested routes.

derrickshowers commented 9 years ago

@maxKimoby I had the same issue, had to downgrade to use ember data 1.0.0-beta.18 (or lower). Not sure if you can do that with ember 2.0, though, since they're so tightly coupled now (reason I opened the issue).

DougPuchalski commented 9 years ago

:+1:

DougPuchalski commented 9 years ago

Confirmed that 1.0.0 beta's newer than 1.0.0-beta.18 fail in case that wasn't clear.

joshfester commented 9 years ago

I have created a pull request that gets the adapter up to date with ember-data 1.13.11. I am using the following features in production: signup, login, facebook, belongsTo relationships, ACL's, and queries. I encourage anyone to try it out and/or make some commits :)

DougPuchalski commented 9 years ago

@joshfester I've got some local changes for logout and loading current user on page reloads, how are you handling that?

joshfester commented 9 years ago

@aceofspades I am using Ember Simple Auth. I posted my authenticator file here.

There's two functions in that authenticator that need to be added to the ParseUser class. You can see those here.

maedi commented 9 years ago

I'm using joshfester's branch on Ember 1.13.10 and Ember Data 1.13.11. I'm debugging an issue where ParseUser model attributes are correctly saved to Parse but not brought back down: screen shot 2015-09-20 at 7 23 40 pm

The adapter's createRecord method mentions that it merges the partial data from Parse back into the record, however ParseUser.signup doesn't seem to call createRecord or merge data. Am I correct in assuming that ParseUser is completely separate from createRecord? (If not then why is ParseUser.signup calling the adapter and building the URL?)

In the actual app controller's signup method I'm using the sample code suggested in the dummy app: https://github.com/clintjhill/ember-parse-adapter/blob/master/tests/dummy/app/controllers/signup.js

There's a few layers here. Would really appreciate a point in the right direction.

maedi commented 9 years ago

I've 'fixed' my issue by mergingdata with serialized in ParseUser.signup:

var serialized = serializer.normalize(model, response);
Ember.merge(serialized.data.attributes, data);
var record = store.push(serialized);
maedi commented 9 years ago

For the fix: https://github.com/maedi/ember-parse-adapter

zkwentz commented 9 years ago

@maedi you should open a PR on this repo. Thx for the fix! :+1:

maedi commented 9 years ago

No worries! Have done: https://github.com/clintjhill/ember-parse-adapter/pull/106

zkwentz commented 9 years ago

@maedi awesome, ty