Infrastructure/Database/DataMappers/TableMapper.php
public function selectForPrimaryKey($primaryKeyValue, string $columns = "*"): ?array
    {
        if (is_null($this->getPrimaryKeyColumnName())) {
            throw new \Exception("$this->tableName primary key not defined");
        }
        $where = [
            $this->getPrimaryKeyColumnName() => [
                'operators' => ['='],
                'values' => [$primaryKeyValue],
            ],
        ];
        if (null !== $records = $this->select($columns, $where)) {
            return $records[0];
        }
        return null;
    }
public function selectForPrimaryKey($primaryKeyValue, string $columns = "*"): ?array
    {
        if (is_null($this->getPrimaryKeyColumnName())) {
            throw new \Exception("$this->tableName primary key not defined");
        }
        $where = [
            $this->getPrimaryKeyColumnName() => [
                'operators' => ['='],
                'values' => [$primaryKeyValue],
            ],
        ];
        if (null !== $records = $this->select($columns, $where)) {
            return $records[0];
        }
        return null;
    }
unlike select(), this returns only the array for a single record, or null