emberjs/data — Issue #132: Error in retrieving records with RESTAdapter
Author: mdi
Created: 2012-02-29 21:01:35+00:00
State: open

Using this code:

LiveJam.store = DS.Store.create({
revision: 2,
adapter: DS.RESTAdapter.create()
})

LiveJam.Models.Event = DS.Model.extend
id: DS.attr("number"),
venue: DS.belongsTo("LiveJam.Models.Venue"),
user: DS.belongsTo("LiveJam.Models.User"),
starts_at: DS.attr("date"),
ends_at: DS.attr("date"),
url: DS.attr("string")

LiveJam.Models.Event.reopenClass
url: "event"

Then calling `LiveJam.store.find(LiveJam.Models.Event, 1)`, returns this error:

Uncaught TypeError: Cannot use 'in' operator to search for 'id' in undefined ember-data.js:1298