question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change request: Change key value internal id

See original GitHub issue

Perhaps this is already possible, but mirageJs adds an id to each entity. For example : [{id: 1, name: 'test'}, {id: 2, name: 'test2'}]

In our setup we don’t use the id as key, but changed this to uuid and in some cases xid.

Is it possible to change the name of the key mirageJS uses for the id value ? Per model / Entity?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
samselikoffcommented, Mar 30, 2021

It’s not configurable at the moment. The relationships use it as foreign keys, so there’d need to be some work done to PR an option to configure the primary key.

0reactions
reno1979commented, Apr 1, 2021

@samselikoff ok thank you, I got it working extending the RestSerializer.

What I can’t seem to get working is dat the serializer works for all traffic.

serializers: {
            application: _serializer,
            person: _serializer
        },

The ‘application’ key should take care of that, but no luck there. So I’m stuck with calling serialize in each route request, what can be going wrong here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

change-request-id - Oxygen XML Editor
Use the change-request-id element to specify an identifier associated with the change request, such as an issue ID or ticket number.
Read more >
Solved: How to get the Change Request's sys_id inside a Bu...
I have a Business Rule with a custom script. The task of this script is to get the JSON of a Change Request...
Read more >
MDG: Object Ids in Change Request - SAP Blogs
Create dynamic internal tables. Fetch Key Value from table PHYSICAL_NAME. Kindly take a note of below points before considering above logic:.
Read more >
Change Requests | Sage Intacct Developer
List information for change requests linked to the project change order with the ID PCO-66. Includes the sum of the change request prices, ......
Read more >
How to change value of a request parameter in laravel
$request->name = "My Value!";. I use this code but does not work: $request->offsetSet('img', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found