public function getItem($pk, $options = array())
{
$query = $this->getQueryClass();
$query->limit(1);
list($fields, $relations, $relationFields) = $this->getFields($options['fields']);
$selects = array_keys($fields);
$query->select($selects);
$this->mapOptions($query, $options);
$this->mapToOneRelationFields($query, $relations, $relationFields);
$this->mapPk($query, $pk);
$stmt = $this->getStm($query);
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
$clazz = $this->getPhpName();
return $row === false ? null : $this->populateRow($clazz, $row, $selects, $relations, $relationFields, @$options['permissionCheck']);
}