public function findObject($type, $id)
    {
        $type = $this->getFullType($type);
        if (class_exists($type)) {
            $table = $type::getCollection();
            if (!($id instanceof MongoId) && $id !== null) {
                try {
                    $id = new MongoId($id);
                } catch (MongoException $e) {
                    $id = null;
                }
            }
            $data = $this->cache->fetch("{$table}_{$id}");
            if (!is_array($data)) {
                $data = $this->mongodb->$table->findOne(['_id' => $id]);
                if (is_array($data)) {
                    $this->cache->store("{$table}_{$id}", $data);
                }
            }
            if ($data === null) {
                return null;
            }
            return new $type($data, $this->mongodb->$table, $this->cache);
        }
        return null;
    }