Model Configuration
setPrimaryKey()
Signature
Section titled “Signature”setPrimaryKey() — returns void
Available in: model
Category: Miscellaneous Functions
Description
Section titled “Description”Allows you to pass in the name(s) of the property(s) that should be used as the primary key(s).
Pass as a list if defining a composite primary key.
This function is also aliased as setPrimaryKeys().
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
property | string | yes | — | Property (or list of properties) to set as the primary key. |