Why emberdata needs Id? Existing api does not return it

Api is returning code as key and name as value. Tried to create a model rest serializer to set primary_key to code. Now findrecord(model,) is working , but having difficulty doing the same thing in mirage. Totally new to ember, so forgive me.

Ember Data requires an id for any record that it loads. You can “make one up” in the serializer layer normalize method (sounds like you might already be doing that).

The mirage equivalent would be to create a mirage serializer that removes the id in the serialize method before sending the payload back to Ember.