title: Ember.js: Model.createRecord not working, not erroring
body: <p>Working on an application which allows Accounts to Post Messages to social media. I'm trying to save my first Message to the Ember Data store but it doesn't seem to be working. Problem is that it's also not erroring so I'm not sure what's going on. Here's the setup:</p>
  
  <p><strong>Models</strong></p>
  
  <pre><code>Social.Account = DS.Model.extend({
      username: DS.attr('string'),
      messages: DS.hasMany('Social.Message')
  });
  
  Social.Message = DS.Model.extend({
      user_id: DS.attr('number'),
      text: DS.attr('string'),
      accounts: DS.hasMany('Social.Account'),
      posts: DS.hasMany('Social.Post')
  });
  
  Social.Post = DS.Model.extend({
      created: DS.attr('date'),
      text: DS.attr('string'),
      message: DS.belongsTo('Social.Message')
  });
  </code></pre>
  
  <p><strong>Data</strong></p>
  
  <pre><code>Social.Account.FIXTURES = [{
      id: 1,
      username: "commadelimited",
      messages: [1, 2]
  }];
  
  Social.Message.FIXTURES = [{
      id: 1,
      user_id: 1,
      text: 'This is message #1 sent by account #1',
      accounts: [1],
      posts: [1]
  }, {
      id: 2,
      user_id: 1,
      text: 'This is message #2 sent by account #1',
      accounts: [1],
      posts: [2]
  }];
  
  Social.Post.FIXTURES = [{
      id: 1,
      created: "5 minutes ago",
      text: 'This is post #1 sent by account #1, tied to message #1'
  }, {
      id: 1,
      created: "5 minutes ago",
      text: 'This is post #2 sent by account #1, tied to message #2'
  }];
  </code></pre>
  
  <p>In the context of Social.NewPostView I have a button which calls a submit method</p>
  
  <pre><code>Social.NewPostView = Ember.View.extend({
      tagName: 'div',
      submit: function(e) {
          msg = Social.Message.createRecord({
              id: 1,
              user_id: 1,
              text: 'This was a created message',
              created: "2013-02-27 13:09:22",
              accounts: [1],
              posts: [1]
          });
          console.log('done');
      }
  });
  </code></pre>
  
  <p>I can trigger an alert box when the user clicks the button, so I know the method is firing. You can see that I've hardcoded a createRecord call here (but in the app I'm using user inputted data). The log statement displays in the console, but I don't see a UI change as expected. Additionally when I introspect the account object for user 1 I get 0 length:</p>
  
  <p><code>Social.Account.find().objectAt(0).get('messages').get('length')</code></p>
  
  <p>When I run this statement in the console I do get something displayed:</p>
  
  <p><code>Social.Message.createRecord({ user_id: 1, text: 'This was a created message', created: "2013-02-27 13:09:22", accounts: [1], posts: [1] })</code></p>
  
  <p>But it's a complex object and I'm not sure what it actually is. I'm basing my code off @toranb's <a href="https://github.com/toranb/complex-ember-data-example" rel="nofollow">complex-ember-data-example</a> project and it seems comparable. I'm sure I'm doing something wrong, but I don't know what it is. Any input would be valued.</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>By logging <code>Social.Message.find().get('length')</code> prior to submitting I get 0. If I hit submit, then immediately run the same log statement I get the following:</p>
  
  <pre><code>4
  Uncaught Error: Attempted to handle event `loadedData` on &lt;Social.Message:ember427:1&gt; while in state rootState.loaded.created.uncommitted. Called with undefined
  </code></pre>
  
  <p>That indicate that the Message is indeed getting created, but is not showing up in the UI. What might my next steps be?</p>