Finds a record by its string GUID.

Fails upon no records returned.

@param string       $guid
@param array|string $columns

@throws ModelNotFoundException

@return Model|array
337451
public function findByGuidOrFail($guid, $columns = [])
    {
        if ($this->schema->objectGuidRequiresConversion()) {
            $guid = Utilities::stringGuidToHex($guid);
        }

        return $this->select($columns)->whereRaw([
            $this->schema->objectGuid() => $guid
        ])->firstOrFail();
    }
511456
protected function _get($columns = '*')
    {
        $data = $this->db->select($this->table, $columns, $this->where);

        if (empty($data)) {
            return false;
        }

        return $this->getModelObjects($data);
    }
1297821
public function get($columns = ['*'])
    {
        return $this->select($columns)->map(function ($row) {
            return Finder::createStore($row);
        });
    }
685863
public function find($id, $columns = ['*'])
    {
        $this->parse();

        return $this->getHandler()->find($id, $this->getColumns($columns));
    }
849415
public function find($id, $columns = ['*'])
    {
        $this->newQuery();

        return $this->query->find($id, $columns);
    }
347175
public function findMany(array $values = [], $columns = [])
    {
        $this->select($columns);

        if (! is_a($this->schema, ActiveDirectory::class)) {
            $query = $this;

            foreach ($values as $value) {
                $query->prepareAnrEquivalentQuery($value);
            }

            return $query->get();
        }

        return $this->findManyBy($this->schema->anr(), $values);
    }
479603
public function get($identifier) : ColumnInterface
    {
        if (false === $this->has($identifier)) {
            throw new ColumnNotFoundException($identifier);
        }

        return $this->items[$identifier];
    }
474955
public function find($find, $column = 'id', array $relations = [], array $columns = ['*'])
    {
        $this->model = $this->where($column, $find);
        $this->model = $this->relation->apply($this->model, $this, $relations);

        return $this->model->firstOrFail($columns);
    }
340125
public function findOrFail($id, $columns = ['*'])
    {
        if (!is_null($entity = $this->find($id, $columns))) {
            return $entity;
        }

        throw (new EntityNotFoundException())->setEntity(get_class($this->entityMap));
    }
213370
public function find($id, $columns = array('*'))
	{
		if (is_array($id))
		{
		    return $this->findMany($id, $columns);
		}

		$this->query->where($this->model->getKeyName(), '=', $id);

		return $this->first($columns);
	}
346304
public static function find($id, array $columns = [])
    {
        $model = static::getInstance();
        $key   = static::getModelKey($id, $model);
        $query = [
            'ConsistentRead' => true,
            'TableName'      => $model->getTable(),
            'Key'            => $key,
        ];
        if ( ! empty( $columns )) {
            $query['AttributesToGet'] = $columns;
        }
        $item = $model->client->getItem($query);
        $item = array_get($item->toArray(), 'Item');
        if (empty( $item )) {
            return null;
        }
        $item = $model->unmarshalItem($item);
        $model->fill($item);
        // Set the model id field.
        $model->setId($id);
        $model->exists = true;
        $model->syncOriginal();

        return $model;
    }
78804
public function findOrFail($id, $columns = ['*'])
    {
        if (Uuid::validate($id)) {
            return $this->findOrFailByUuid($id, $columns);
        } else {
            return parent::findOrFail($id, $columns);
        }
    }
515159
public function find($id, $columns = ['*'])
    {
        if (is_array($id) || $id instanceof Arrayable) {
            return $this->findMany($id, $columns);
        }

        return $this->whereKey($id)->first($columns);
    }
806735
public function loadByGUID($model, $guid)
    {
        /**
         * @var Remote\Model
         */
        $class = $this->validateModelClass($model);

        $uri = sprintf('%s/%s', $class::getResourceURI(), $guid);
        $api = $class::getAPIStem();

        $url = new URL($this, $uri, $api);
        $request = new Request($this, $url, Request::METHOD_GET);
        $request->send();

        //Return the first (if any) element from the response.
        foreach ($request->getResponse()->getElements() as $element) {
            /**
             * @var Remote\Model
             */
            $object = new $class($this);
            $object->fromStringArray($element);

            return $object;
        }

        return;
    }
614603
public function findOrFail($id, $columns = ['*'], $with = [])
    {
        $cacheKey = $this->generateKey([$id, $columns, $with]);

        return $this->cacheResults(get_called_class(), __FUNCTION__, $cacheKey, function () use ($id, $columns, $with) {
            return $this->model->with($with)
                ->findOrFail($id, $columns);
        });
    }
144595
public function getObjectInstanceByGuid($guid)
    {
        if (isset($this->objectsByGuid[$guid])) {
            return $this->objectsByGuid[$guid];
        } else {
            return null;
        }
    }
1270620
public function getModels($columns = ['*'])
    {
        $models = [];

        $documents = $this->query->get($columns);
        foreach ($documents as $doc) {
            $models[] = $this->model->newInstance($doc, true);
        }

        return $models;
    }