Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8879131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:53:01+00:00 2026-06-14T19:53:01+00:00

So while writing an Ember.js app, I couldn’t get the most basic ember-data records

  • 0

So while writing an Ember.js app, I couldn’t get the most basic ember-data records to work. Using the latest git builds of Ember.js and ember-data, I ran this code in firebug: (Using what I learned from the guide to ember-data on github)

App.store = DS.Store.create({
    revision: 8,
    adapter: DS.RESTAdapter.create({bulkCommit: false, namespace: "api"})
});

App.Test = DS.Model.extend({
    test: DS.attr('string')
});

App.store.load(App.Test, 1, {test: "abc"});

App.store.findById(App.Test, 1);

Edit: mspisars’ answer made me realize that findById() is not the function to use (Although it does have the same result). That’s a function for internal ember-data use.

The last line returns an App.Test object with its test property set to “undefined”. I got the same results using createRecord to create the record (admittedly I don’t remember the difference).

From what I can see this is not a duplicate of this question, although the symptoms are almost the same.

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:53:03+00:00Added an answer on June 14, 2026 at 7:53 pm

    I was accessing the stored data in the wrong way. After loading the data, I was trying to get the data like this:

    t = App.store.find(App.Test, 1);
    
    console.log(t.test); // wrong
    

    That returns undefined.

    I should have done this:

    console.log(t.get('test'));
    "abc"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an iPhone app that's using Facebook Connect. While testing, you normally embed
I'm just getting started with Ember and come across this issue while writing some
While writing a file using ofstream, how do I know when the file's size
While writing var e = element.NextSibling as HtmlElement; I get an invalid cast exception.
While writing a simple library to parse a game's data files, I noticed that
While writing an app, I encountered some odd behavior that I wasn't expecting and
While writing a game for J2ME we ran into an issue using java.lang.Integer.parseInt() We
while writing an formula for data in a excel cell if an excel cell
while writing an algorithm dealing with excel data if we want to compare each
While writing and testing a python method, I am currently using the following approach:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.