-
Notifications
You must be signed in to change notification settings - Fork 82
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
Problems with latest ember-data 1.0.0-BETA.3 #96
Comments
Thanks for reporting the issue, we'll look at it as soon as we can! |
@sarus I'm using ember-tools with the latest ember-data. Did you also update ember.js (I'm using |
Also I remember I also had to manually update localstorage_adapter (in case you're using that). |
Ohh and I also changed The revision isn't needed and we just give it a reference to the adapter instead of creating it.
|
Actually there's just a PR. You could clone that repo and create the app by calling |
I was still using Ember 1.0.0 so I went ahead and dropped in Ember 1.1.0-BETA.4 into the vendor folder. I'm using the FixtureAdapter so I manually updated
Fnially, my
The app seems to build fine but it doesn't load and I get the following error:
I'm guessing I'm using the new ember-data incorrectly (if I switch back to the old ember and ember-data everything was working fine). I know the above console error isn't very useful but do you notice something I'm missing or doing wrong in getting everything setup? The app doesn't load at all (just a blank browser) so I'm not sure where to look for the issue. Appreciate your assistance. |
Can you share |
This is my
|
Well I'm starting to think that the problem is with all the changes in ember-data when moving to 1.0.0-BETA.3. I checked this document which shows the transitions required (https://github.com/emberjs/data/blob/master/TRANSITION.md). Based on the transitions document it seems like setting up the store only requires one line:
and so store.js isn't really needed and app.js would become:
When declaring your models you also have to use the shorthand name of the model which I wasn't: So |
Okay, got things working. I followed the ember.js getting started guide and downloaded the two files linked in that document: ember.js -> http://builds.emberjs.com/tags/v1.0.0/ember.js My suggestion would be to stick with the versions of ember and ember-data used in the official ember guide rather than including ember-1.1.0 so that ember-tools is in sync with the documentation most new ember users will be following. This is all I needed for my app.js file (when using the FixtureAdapter), and I did not need store.js anymore:
Thank you for all your help! The Ember community is really fantastic and supportive. I'm a big fan. |
Hi @sarus Im glad you got it working. I'm not sure what the difference was with @fivetanley let me know what do you think. I'm happy to update the PR based as needed. |
I tried updating the ember-data.js file in /js/vendor to the latest 1.0.0-BETA.3.
Unfortunately the generated app.js file and store.js no longer seems correct for the latest ember-data and I can't seem to figure out what I need to change.
Right now I'm just using FIXTURES to load test data. I know we should not have to specify the revision anymore or make calls to registerAdapter. In fact, based on the Models guide it seems like all you need to do is include ember-data and then extend DS.Model with your own models.
Has anyone successfully used ember-tools with the latest ember-data? What changes are required to app.js, store.js and the structure (if any) to get this working? Thank you!
The text was updated successfully, but these errors were encountered: