Returns the primary key names for this AR class.
The default implementation will return the primary keys as declared in the DB table that's associated with this AR class.
If the DB table doesn't declare any primary key, you should override this method to return the property names that you want to use as primary keys for this active record class.
Note that an array should be returned even for a table with a single primary key.
| public abstract string[] primaryKey ( ) | ||
| return | string[] |
The primary keys of the associated database table. |
|---|---|---|
public function primaryKey(): array;
Signup or Login in order to comment.