Interface IdentityField
Defined in: warp-drive-packages/core/src/types/schema/fields.ts:298
Represents a field whose value is the primary key of the resource.
This allows any field to serve as the primary key while still being able to drive identity needs within the system.
This is useful for resources that use for instance 'uuid', 'urn' or 'entityUrn' or 'primaryKey' as their primary key field instead of 'id'.
Properties
kind
kind: "@id";Defined in: warp-drive-packages/core/src/types/schema/fields.ts:304
The kind of field this is.
name
name: string;Defined in: warp-drive-packages/core/src/types/schema/fields.ts:312
The name of the field that serves as the primary key for the resource.
sourceKey?
optional sourceKey?: string;Defined in: warp-drive-packages/core/src/types/schema/fields.ts:334
The name of the field as returned by the API and inserted into the Cache if it differs from IdentityField.name
For instance, if the API returns:
{
entityUrn: '324523-sadf34-345'
}But the app desires to use record.id; // '324523-sadf34-345'
Then name would be set to 'id' and sourceKey would be set to 'entityUrn'.
This option is only needed when the value differs from name.