# Assertion Failed on destroyRecord

**URL:** <https://discuss.emberjs.com/t/assertion-failed-on-destroyrecord/14365>\
**Category:** Ember Data\
**Created:** [March 9, 2018, 10:26am UTC](https://discuss.emberjs.com/t/assertion-failed-on-destroyrecord/14365 "2018-03-09T10:26:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![qwerty](https://avatars.discourse-cdn.com/v4/letter/q/4491bb/32.png) [@qwerty](https://discuss.emberjs.com/u/qwerty)\
**Post date:** [March 9, 2018, 10:26am UTC](https://discuss.emberjs.com/t/assertion-failed-on-destroyrecord/14365/1 "2018-03-09T10:26:44Z")

</div>

Hi, I use Ember 3.0 and LoopBack 3.0 as backend. When I try to delete record from model (Code) I get an error:

> Assertion Failed: ‘code:4’ was saved to the server, but the response returned the new id ‘null’. The store cannot assign a new id to a record that already has an id.

In the database the record is deleted but the page does not reload.

When I create record everything is ok.

My application adapter: (app/adapters/application.js)

```
import DS from 'ember-data';
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';

export default DS.RESTAdapter.extend(DataAdapterMixin, {
  authorizer: 'authorizer:application',

  host: 'https://my-api-url',
  namespace: 'api',

});

```

My application serializer: (app/serializers/application.js)

```
import DS from 'ember-data';

export default DS.JSONSerializer.extend({
});

```

After sending the DELETE request, the server sends a 200 OK status code and response with {“count”:1} content.

How can I modify my serializer to work properly?

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![qwerty](https://avatars.discourse-cdn.com/v4/letter/q/4491bb/32.png) [@qwerty](https://discuss.emberjs.com/u/qwerty)\
**Post date:** [March 14, 2018, 8:54am UTC](https://discuss.emberjs.com/t/assertion-failed-on-destroyrecord/14365/2 "2018-03-14T08:54:33Z")

</div>

I resolved problem by installing loopback-component-jsonapi

> **[GitHub - digitalsadhu/loopback-component-jsonapi: JSONAPI support for loopback.](https://github.com/digitalsadhu/loopback-component-jsonapi)**
>
> JSONAPI support for loopback. . Contribute to digitalsadhu/loopback-component-jsonapi development by creating an account on GitHub.
