Closed knownasilya closed 2 years ago
You should be able to either pass in id
to createRecord()
or override generateIdForRecord
if you have a specific format you want to use:
// app/adapters/application.js
generateIdForRecord(store, type): string {
const id = super.generateIdForRecord(store, type);
return `${type.substring(0, 3)}_${id}`;
}
I tried passing id, and that didn't create the record. Maybe there was some other issue. Will try again later.
It does work, 🤷🏼 seems like I had something else going on before.
Is there a way to do this? If not, this is a request for that 😄