property CosmosEntityMapping.primaryKey

The repository-visible primary-key field name. Defaults to 'id'.

A Cosmos document's identity is always its id property, so a mapping that names another field renames it onto id on write and back on read — the MongoEntityMapping.primaryKey behaviour, for the same reason.

Type

string

Usage

import { type CosmosEntityMapping } from "database-plugin/src/index.ts";