public function getModelHistory(string $model, $foreignKey, int $itemsToShow, int $page, array $conditions = [], array $options = []): array
    {
        $conditions = Hash::merge([
            'model' => $model,
            'foreign_key' => $foreignKey
        ], $conditions);
        $options = Hash::merge([
            'includeAssociated' => false
        ], $options);

        if ($options['includeAssociated']) {
            $hashes = $this->find()
                ->select(['save_hash'])
                ->where($conditions);

            $history = $this->find()
                ->where([
                    'save_hash IN' => $hashes
                ]);
        } else {
            $history = $this->find()
                ->where($conditions);
        }

        $history = $history->order([
                'revision' => 'DESC',
                'ModelHistory.created' => 'DESC'
            ])
            ->contain(['Users'])
            ->limit($itemsToShow)
            ->page($page)
            ->toArray();

        return $this->_transformDataFields($history, $model);
    }