# Updating ID after createRecord

**URL:** <https://discuss.emberjs.com/t/updating-id-after-createrecord/6258>\
**Category:** Uncategorized\
**Created:** [September 12, 2014, 9:14pm UTC](https://discuss.emberjs.com/t/updating-id-after-createrecord/6258 "2014-09-12T21:14:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emorling](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/emorling/32/9484_2.png) [@emorling](https://discuss.emberjs.com/u/emorling)\
**Post date:** [September 12, 2014, 9:14pm UTC](https://discuss.emberjs.com/t/updating-id-after-createrecord/6258/1 "2014-09-12T21:14:10Z")

</div>

I have a Room model

```
App.Room = DS.Model.extend({
  name : DS.attr(),
  url : DS.attr(),
  created_at : DS.attr(),
  updated_at : DS.attr(),
  messages: DS.hasMany('message',{async:true})
});

```

I am saving new records client side like this:

```
var room = {name: 'happy day'} ;
this.store.createRecord('room', room).save();

```

My custom adapter with JSONSerializer is resolving this JSON from the server:

```
{"user":{"name":"gggg","id":19,"url":"lv"}} 

```

However, the ID is not being updated upon store.createRecord().

Can you spot anything wrong here?

---

<div class="post-metadata">

**Author:** ![emorling](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/emorling/32/9484_2.png) [@emorling](https://discuss.emberjs.com/u/emorling)\
**Post date:** [September 12, 2014, 10:28pm UTC](https://discuss.emberjs.com/t/updating-id-after-createrecord/6258/2 "2014-09-12T22:28:46Z")

</div>

I changed to

```
App.ApplicationSerializer = DS.RESTSerializer;

```

and it works.

Feel free to delete this topic 🙂
