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.

5458 questions
2
votes
1 answer

Ember-data store PUT request

Is there any way to include the 'has many' models in the 'put' request sent using ember data-store REST adapter?
inertia
  • 404
  • 4
  • 15
2
votes
1 answer

Ember-Data Fixture Adapter

Is there a commit method for the fixture adapter? What does it do? As my understanding goes store.commit() puts an API call when used with REST adapter. Can I use isLoaded property with fixture adapter? Basically I have 2 records in my controller…
inertia
  • 404
  • 4
  • 15
2
votes
0 answers

Ember-Data Transformed Value not Updated With Bindings

Here is my transformer: DS.attr.transforms.category = { from: function(serialized) { return OO.Category.create({ tag: serialized }); }, to: function(deserialized) { return deserialized.get('tag'); …
Josh Minzner
  • 540
  • 1
  • 4
  • 13
2
votes
2 answers

Ember.js Router based application not loading ember-data object on Page refresh

I am following Router based application structure based on http://emberjs.com/guides/outlets/. I am able to follow, and make it work. But Having issue while loading content when page is showing post (e.g. /#/posts/2), I suspect that it is because,…
Nachiket
  • 5,421
  • 6
  • 37
  • 47
2
votes
0 answers

Notify Parent hasMany list when child changes its parent

Say i have a relationship Parent (1) <-> Child (0..n) and corresponding models Zik.Node = DS.Model.extend({ id : DS.attr('number'), name : DS.attr('string'), leafs : DS.hasMany('Zik.Leaf', {key : 'leaf_ids'}) }); Zik.Leaf =…
Kristaps
  • 158
  • 1
  • 6
2
votes
1 answer

How to handle router transition from Ember.js controller?

How should I handle transitioning to a different view after a successful save of a new Project object? If my validation passes, I want to commit the @transaction and transition to the Projects index view. Controller: DA.ProjectsController =…
David
  • 1,189
  • 14
  • 30
2
votes
1 answer

Is there a way to use an embedded ember-data model association before it's loaded without referencing the root object?

To explain my question, I have concocted a contrived example, so bear with me. I have two related ember-data models that each have the same type of embedded association: App.Article = DS.Model.extend({ title: DS.attr("string"), summary:…
Kevin Bullaughey
  • 2,456
  • 20
  • 35
2
votes
1 answer

use results from ember data findQuery as ArrayController contentBinding

I'm trying to write my first "real" ember app. I've gone through a couple tutorials and I'm now attempting to use ember in conjunction with Ember Data to fetch data from a Rails app and display it. I've gotten it to fetch the data, parse it, and…
rm-rf
  • 1,213
  • 1
  • 15
  • 23
2
votes
1 answer

Proper way to use parent route parameters with ember-data?

In my app, I am trying to keep the routing structure as close to the API structure as possible, which ember facilitates in the basic case but I am still confused about the following case: (In reference to the example of…
dechov
  • 1,833
  • 1
  • 15
  • 18
2
votes
0 answers

How to combine two DS.RecordArray in an Ember.ArrayController

I want to create a view in Ember that combines records from two models and sorts them according to a common attribute. I have made a working fiddle, but I am not sure if I am doing it right. http://jsfiddle.net/UtrtJ/15/ Is there a better way to do…
Sam Goldman
  • 1,396
  • 12
  • 13
2
votes
0 answers

How do I use ember-data to model this setup in mongodb?

I have an Item that can have many Sections. I store it in mongodb as an Item document with many Section embedded documents. The Item can have a lot of Sections. What is the recommended way to do this in ember-data? When a Section is changed, should…
Rick Moss
  • 926
  • 1
  • 16
  • 34
2
votes
4 answers

Mapping data in ember-data

I have a basic ember-data model object: App.Group = DS.Model.extend({ //attributes }); I have json which is structured like this: root.levelone.leveltwo.property I don't want to map this project as is but would like to map property in the json to…
dagda1
  • 21,477
  • 48
  • 188
  • 367
2
votes
1 answer

Ember Data populate records

Need help getting Ember-Data working with Zend Rest. At first, I'm familiar with Zend Framework, so the Rest Adapter was easy to setup. Requests by telnet show it works and response also has well-formed HTTP codes. The setup with Ember Data was a…
cuber
  • 31
  • 3
2
votes
2 answers

Remove record from Store without causing server call on DS.Store#commit

I'm developing a push application and need to remove items from a DS.Store without invoking any actions. I'm able to insert objects using load(), but need to be able to "unload" an object after it has been deleted on another client. Thanks
barcrab
  • 201
  • 2
  • 12
2
votes
1 answer

Ember-data bootstrapping model objects

When bootstrapping Ember-data model objects with existing JSON that is not from a remote AJAX call, do I have to make the following 2 calls: App.store.load(App.Account, data); var account = App.store.find(App.Account, data.id); Is it not possible…
dagda1
  • 21,477
  • 48
  • 188
  • 367
1 2 3
99
100