public function addUnique($unqdata)
    {
        if ($unqdata instanceof Unique) {
            $unique = $unqdata;
            $unique->setTable($this);
            $unique->getName(); // we call this method so that the name is created now if it doesn't already exist.
            $this->unices[] = $unique;

            return $unique;
        } else {
            $unique = new Unique($this);
            $unique->loadFromXML($unqdata);

            return $this->addUnique($unique);
        }
    }