ember-parse-adapter icon indicating copy to clipboard operation
ember-parse-adapter copied to clipboard

Breaks on latest version of Ember Data

Open derrickshowers opened this issue 10 years ago • 13 comments

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.

derrickshowers avatar Aug 24 '15 04:08 derrickshowers

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.

maxKimoby avatar Sep 02 '15 20:09 maxKimoby

@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).

derrickshowers avatar Sep 06 '15 20:09 derrickshowers

:+1:

DougPuchalski avatar Sep 10 '15 21:09 DougPuchalski

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

DougPuchalski avatar Sep 10 '15 22:09 DougPuchalski

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 :)

joshfester avatar Sep 11 '15 00:09 joshfester

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

DougPuchalski avatar Sep 12 '15 00:09 DougPuchalski

@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.

joshfester avatar Sep 12 '15 01:09 joshfester

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 avatar Sep 20 '15 09:09 maedi

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 avatar Sep 20 '15 16:09 maedi

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

maedi avatar Oct 05 '15 11:10 maedi

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

zkwentz avatar Oct 13 '15 16:10 zkwentz

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

maedi avatar Oct 13 '15 21:10 maedi

@maedi awesome, ty

zkwentz avatar Oct 13 '15 21:10 zkwentz