public function addDatabase(Database $database)
    {
        if(!$this->getDatabases()->contains($database)) {
            $database->setId($this->getDatabases()->count());
            $database->setInstance($this);
            $this->getDatabases()->add($database);
        }
    }