public function deletar(Pais $obj)
 {
     $where = "WHERE " . self::ID . " = '" . $obj->getId() . "'";
     if ($obj->getEstados()->getTotal() > 0) {
         throw new Exception("Há Estados cadastrados com este País");
     } else {
         $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
     }
 }
Exemple #2
0
 public static function addInstanceToPool(Pais $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         self::$instances[$key] = $obj;
     }
 }
Exemple #3
0
 public function setPais(Pais $v = null)
 {
     if ($v === null) {
         $this->setFkPaisId(0);
     } else {
         $this->setFkPaisId($v->getId());
     }
     $this->aPais = $v;
     if ($v !== null) {
         $v->addAlumno($this);
     }
     return $this;
 }