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
1 answer

How to prevent a model from being committed with ember-data?

I'm using the latest rev of ember-data and I have a typical situation where most of the models need to be managed by ember-data so when I do a commit on the store they sync up w/ the backend. In one particular case I have a model that is only used…
Toran Billups
  • 27,111
  • 40
  • 155
  • 268
2
votes
2 answers

Ember Data, how to use registerTransform

I've been Googling for a while now, but haven't found any good solution. The root of the problem is that my records aren't being set to isDirty when using this method: DS.JSONTransforms.object = { deserialize: function(serialized) { return…
kroofy
  • 984
  • 2
  • 7
  • 21
2
votes
1 answer

How do I modify the urls that are being generated by ember-data's REST adapter?

I can account for pluralisation using: DS.RESTAdapter.configure("plurals", { query: "queries" }); but I need to append '.json' to all of the routes that are being generated as the API I am working with throws an error if this does not happen.…
i0n
  • 916
  • 1
  • 8
  • 26
2
votes
1 answer

How to commit related models

I'm working with ember-pre4 and ember-data rev 11. Models: A = DS.Model.extend({ //some other fields b: DS.hasMany('B') }) B = DS.Model.extend({ //some other fields a: DS.hasOne('A') }) In my router I create an instance of model A…
Andrew Fan
  • 87
  • 2
  • 8
2
votes
2 answers

createRecord called w/o params does not add object to collection

Using: ember-1.0.0-pre.4.js ember-data.js REVISION:11 handlebars-1.0.rc.2.js Please have a look at this jsFiddle illustrating the described problem. I have a list of items that are displayed in a template. The template contain a linkTo helper that…
bazzel
  • 833
  • 7
  • 22
2
votes
1 answer

Ember.js pre.4, RESTAdapter and hasMany relationships

I'm doing my damnedest to find and/or cobble together a working jsfiddle of a hasMany/belongsTo relationship in the latest version of ember.js and ember-data that utilizes the RESTAdapter. So far I have found a pre.4 baseline fiddle by @zgramana…
Bryan Langslet
  • 292
  • 2
  • 10
2
votes
1 answer

What is the correct way to save a modified record (EMBER 1.0.0-PRE.4)

I have developed a small test application. Loading the person records works as expected. I can modify firstName and lastName. In the personedit template I have a action which triggers the save method of the App.PersonController. What is the best…
abaumann
  • 63
  • 5
2
votes
1 answer

emberjs new-router-V3/controller can't create or edit record using ember-data

In this jsfiddle, I have EmBlog.PostsNewRoute and EmBlog.PostsEditRoute. The routes contain events for 'save, cancel and destroy'. When I create a new record, it only creates it in memory and never calls the store.commit() and in the console, it…
brg
  • 3,915
  • 8
  • 37
  • 66
2
votes
1 answer

Emberjs: Prevent changes propagation throughout a transaction

I have a scenario where I list products in a page and allow users to edit products' properties only in a modal window. When a user clicks on the product and start editing the product's properties, changes gets propagated right away to the product…
ken
  • 3,745
  • 6
  • 34
  • 49
2
votes
0 answers

HasMany associations update

How to update hasMany associations in record? I tried this approach: record.get('childrenRecords').clear(); newChildrenRecords.forEach(function (child) { record.get('childrenRecords').pushObject(App.ChildModel.find(child.get('id')); }); But I got…
Andrii
  • 46
  • 3
2
votes
2 answers

How do I render multiple templates into a template and set the models for those templates?

I have a template that renders two other templates dashboard/panelOne and dashboard/panelTwo. It renders each template but the data is never bound to the controller. I am assuming that renderTemplate is skipping the route to do this. You will…
Sean Keating
  • 1,718
  • 14
  • 28
2
votes
1 answer

Ember-data: nested model properties access errors out

I'm facing a strange issue accessing nested model properties in my handlebars template. My JSON feed looks like this: { "hic": { "id": "1", "tree": { "id": "1", "folder": [ {name: "test1"}, {name:…
david8401
  • 379
  • 1
  • 3
  • 11
2
votes
2 answers

Force a controller to always act as a proxy to a model in Ember

I'm looping through a content of an ArrayController whose content is set to a RecordArray. Each record is DS.Model, say Client {{# each item in controller}} {{item.balance}} {{/each}} balance is a property of the Client model and a call to…
ken
  • 3,745
  • 6
  • 34
  • 49
2
votes
2 answers

How to make ArrayController ignore DS.Store's transient record

I have a list of clients displayed through a ClientsController, its content is set to the Client.find() i.e. a RecordArray. User creates a new client through a ClientController whose content is set to Client.createRecord() in the route handler. All…
ken
  • 3,745
  • 6
  • 34
  • 49
2
votes
1 answer

How do I use Redis as the persistence for an Ember Data Store?

How do I use redis as the backend for an ember-data Data Store? It looks like I may need a custom adapter?
Michael
  • 2,973
  • 1
  • 27
  • 67
1 2 3
99
100