Questions tagged [ember-data]

ember-data is a data persistence extension for the Ember.js framework.

Because the MVC framework builds applications which run in the browser rather than returning fully-rendered pages in response to browser requests, it requires a method for saving and reloading user data.

Ember.js supports a number of "data persistence" libraries, including a data store component inherited from the framework. In general these frameworks support CRUD operations on a RESTful web service, and as such they are agnostic regarding the technology of the back-end web service.

Ember-data is the "official" data persistence library for Ember.js, supported by the Ember.js team. It uses "adapters" to load data for use by Ember.js applications, and allows developers to write custom adapters to support their own specific data store.

Beta Period

During the beta period (up until 1.0) the API is constantly changing, you can keep up to date by reading the Transition Document.

Getting help

Ember-data is supported in much the same way as Ember.js itself.

The Stack Overflow tag is actively monitored by several contributors to Ember. You may try asking questions in the active IRC channel #emberjs on irc.freenode.net. Other resources can found on the Ember.js community page

Technical questions that are accompanied by working code make it easier for other to help give good answers. JSFiddle | JSBin

To report bugs against Ember.js, or to propose new functionality, create an issue on the Github project.

5483 questions
2
votes
3 answers

Routing + DS with ember-1.0.0-rc.1 + ember.data-11 [demo + tutorial + source]

Where can I find a tutorial + demo + source to the latest ember-1.0.0-rc.1 + ember.data-11 version? Starter-Level. I tried so many tutorials, but all I found are out dated :( Thanks so much in advance.
Daniel
  • 111
  • 1
  • 8
2
votes
1 answer

supported method for transitioning to new object

I have a save event set up with my post creation route. App.PostsNewRoute = Ember.Route.extend({ model: function(){ return App.Post.createRecord(); }, exit: function() { this._super(); …
sentinel21
  • 546
  • 7
  • 24
2
votes
1 answer

Filtering Ember results

I can work with Ember.js(rc0) and Rails, and have a simple app working as I'd expect, but want to focus on a specific story: As a user, I want to type in "filter" text in a form, then have my ArrayController only show me those items that match the…
Daniel D
  • 3,637
  • 5
  • 36
  • 41
2
votes
1 answer

Ember.js data transition after version upgrade

So I'm writing a POC app, and I am running into an issue after upgrading my Ember library to RC1. I noticed that when I was transitioning to a route in the new version, a stringified version of the object appears to show up in the URL, like…
sentinel21
  • 546
  • 7
  • 24
2
votes
2 answers

How do you load data into Ember Data from a Socket.IO response?

I'm writing an app which leverages Ember.js, with Ember Data, and Socket.IO through Node.js. I'm trying to figure out the best way to receive data from a socket response and load it into my Ember Data store, such as this: window.socket =…
Alex Coleman
  • 601
  • 7
  • 18
2
votes
1 answer

ember data filter

If I have some models like this App.Transaction = DS.Model.extend({ amount: DS.attr('number'), type: DS.attr('string') }); where type can be something like "VISA" or "Mastercard" or "Cash". I have a computed property that calculates the…
Devin Crossman
  • 7,454
  • 11
  • 64
  • 102
2
votes
3 answers

Rails + Ember.js + Devise freelance journalist app - data scoping

Apologies, I have been in ember.js-land for so long, I'm fumbling Rails + active_model_serializers JSON api basics. So let's say I'm a freelance journalist and am building an app where a writer can publish Articles to different Company-specific…
2
votes
1 answer

Sideloading belongsTo data in Ember.js RC1 with ember-data

Sideloading is working in our app for hasMany relationships, but I can't get it to work for belongsTo relationships. I'm trying to use the documented DS.RESTAdapter.configure() method, but that doesn't seem to have any effect. The error I am getting…
dignoe
  • 1,013
  • 11
  • 17
2
votes
1 answer

Where should faux-persisted state live in your ember.js web app?

I was reading the excellent Getting started with ember.js post by @twbrandt recently and found his explanation of what your controller/view/model/router/template "should be responsible for" interesting. When you have a database backed model all is…
Toran Billups
  • 27,111
  • 40
  • 155
  • 268
2
votes
3 answers

Ember - Abort ajax request

I want to know how to abort a request. For example, I issue App.MyModel.find() and later i want to cancel/abort it before it returns from server. I would expect something like this: var res = App.MyModel.find(); //request sent to…
Shimon Rachlenko
  • 5,469
  • 40
  • 51
2
votes
1 answer

How to refresh templates in Ember when data is added/removed?

I have a simple part of my Ember application that's supposed to draw a list of books. The issue is that if the user visits the list before the books are loaded from the server, the list will be empty. Even after the data finishes loading, the list…
NudeCanalTroll
  • 2,266
  • 2
  • 19
  • 43
2
votes
2 answers

how do I register a transform in ember-data rev 11?

For example, to register a type raw in an older version, I would have done something like this: DS.attr.transform.raw = { from: function(serialized) { return serialized; }, to: function(deserialized) { return…
Shreyans
  • 871
  • 7
  • 20
2
votes
2 answers

Ember.js get nested resources attributes from parent

I have these models: TravelClient.Tour = DS.Model.extend({ title: DS.attr('string'), description: DS.attr('string'), seats: DS.attr('number'), takenSeats: DS.hasMany('TravelClient.TakenSeat', {embedded:'always'}) TakenSeats: function() { …
xamenrax
  • 1,724
  • 3
  • 27
  • 47
2
votes
1 answer

Ember - clear form after submitting

I created very simple Ember app, using Ember Data. There is one form where the user creates the entity and submits. It's in BandsNewView (created automatically by Ember), controlled by BandsNewController: App.BandsNewController =…
Pavel S.
  • 11,892
  • 18
  • 75
  • 113
2
votes
1 answer

How to remove duplicate records in ember-data during addObjects

I'm working with a set of data that can potentially have duplicate values. When I initially add the data I'm using what little information I have available on the client (static info stored on the model in memory). But because I need to fetch the…
Toran Billups
  • 27,111
  • 40
  • 155
  • 268
1 2 3
99
100