public function getStoragePrimaryKey()
{
if (!$this->storagePrimaryKey) {
$primaryKeys = [];
foreach ($this->platform->getColumns($this->storageName) as $column => $meta) {
if ($meta['is_primary']) {
$primaryKeys[] = $column;
}
}
if (count($primaryKeys) === 0) {
throw new InvalidArgumentException("Storage '{$this->storageName}' has not defined any primary key.");
}
$this->storagePrimaryKey = $primaryKeys;
}
return $this->storagePrimaryKey;
}