final public function ormToEntity($data = [], $entity = '') {
        $entities = [];

        foreach ($data as $value) {
            if ($entity != '') {
                $entityName = '\entity\\' . $entity;
                $entityObject = new $entityName(Database::instance()->db());

                foreach ($value as $key => $value2) {
                    $entityObject->$key = $value2;
                }
            }
            else {
                $entityObject = new Multiple($data);
            }

            array_push($entities, $entityObject);
        }

        return $entities;
    }