public function findPrimary(bool $sameCollection = true): string
    {
        $primary = $this->schema->getClass();
        foreach ($this->schemas as $schema) {
            //Only Document and DocumentEntity classes supported
            if (!$schema instanceof DocumentSchema) {
                continue;
            }

            if ($this->schema->getReflection()->isSubclassOf($schema->getClass())) {
                if ($sameCollection && !$this->compareCollection($schema)) {
                    //Child changed collection or database
                    continue;
                }

                $primary = $schema->getClass();
            }
        }

        return $primary;
    }