protected function fetchMissingObjectData(Model $object, $uniqueIdentifier, $relationshipsToAutoHydrate = [])
    {
        $schema = $this->getRepositorySchema();
        $table = $schema->schemaName;

        $data = self::returnFirstRow(
            "SELECT * FROM `" . $table . "` WHERE `{$schema->uniqueIdentifierColumnName}` = :id",
            ["id" => $uniqueIdentifier],
            static::getReadOnlyConnection()
        );

        if ($data != null) {
            return $this->transformDataFromRepository($data);
        } else {
            throw new RecordNotFoundException(get_class($object), $uniqueIdentifier);
        }
    }
protected function fetchMissingObjectData(Model $object, $uniqueIdentifier, $relationshipsToAutoHydrate = [])
    {
        $schema = $this->getRepositorySchema();
        $table = $schema->schemaName;

        $data = self::returnFirstRow(
            "SELECT * FROM `" . $table . "` WHERE `{$schema->uniqueIdentifierColumnName}` = :id",
            ["id" => $uniqueIdentifier],
            static::getReadOnlyConnection()
        );

        if ($data != null) {
            return $this->transformDataFromRepository($data);
        } else {
            throw new RecordNotFoundException(get_class($object), $uniqueIdentifier);
        }
    }
protected function fetchMissingObjectData ( Model $ object , $ uniqueIdentifier , $ relationshipsToAutoHydrate = [ ] ) { $ schema = $ this -> getRepositorySchema ( ) ; $ table = $ schema -> schemaName ; $ data = self :: returnFirstRow ( "SELECT * FROM `" . $ table . "` WHERE `{$schema->uniqueIdentifierColumnName}` = :id" , [ "id" => $ uniqueIdentifier ] , static :: getReadOnlyConnection ( ) ) ; if ( $ data != null ) { return $ this -> transformDataFromRepository ( $ data ) ; } else { throw new RecordNotFoundException ( get_class ( $ object ) , $ uniqueIdentifier ) ; } }
Fetches the data for a given unique identifier.

@param Model $object
@param mixed $uniqueIdentifier
@param array $relationshipsToAutoHydrate An array of relationship names which should be automatically hydrated
(i.e. joined) during the hydration of this object. Not supported by all
Repositories.

@throws RecordNotFoundException
@return array
Fetches the data for a given unique identifier .