Brand new to ngrx.
My Id (capital Id) is not being mapped - system is trying to use id, leading to multiple console errors. I am using "@ngrx/data": "^8.6.0". I am using 8.?? because I am on Angular 8 (planning 9 in a month). Can I use an newer version?
I have temporarily mapped Id to id and it works but every backend call looks the same and it causes other issues to work around. how do I get my selectId registered (it can be default as well, all backend calls use Id.
I have a service registered manually - due to transformations to align data:
export class PregateService extends DefaultDataService<Pregate>
super('Pregate', http, httpUrlGenerator);
I have my map registering the id override:
export function UpperId(entity: any): string {
return entity.Id;
}
export const entityMetadata: EntityMetadataMap = {
Pregate: {
selectId: UpperId,
},
// Stackrun: {},
// Staging: {}
};
which is registered through the module:
@NgModule({
declarations: [],
providers: [{ provide: DefaultDataServiceConfig, useValue: defaultDataServiceConfig }],
imports: [
StoreModule.forRoot({}, {}),
EffectsModule.forRoot([]),
EntityDataModule.forRoot({ entityMetadata }),
StoreDevtoolsModule.instrument(),
],
})