Exemplo n.º 1
0
 protected function getEscalanota($establecimiento_id)
 {
     $aDatosTablaEscalaNota = array();
     $criteria = new Criteria();
     $criteria->add(EscalanotaPeer::FK_ESTABLECIMIENTO_ID, $establecimiento_id);
     $aEscalanota = EscalanotaPeer::doSelect($criteria);
     foreach ($aEscalanota as $escalanota) {
         $aDatosTablaEscalaNota[$escalanota->getNombre()] = $escalanota->getId();
     }
     return $aDatosTablaEscalaNota;
 }
Exemplo n.º 2
0
 public function getEscalanotas($criteria = null, PropelPDO $con = null)
 {
     if ($criteria === null) {
         $criteria = new Criteria(EstablecimientoPeer::DATABASE_NAME);
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEscalanotas === null) {
         if ($this->isNew()) {
             $this->collEscalanotas = array();
         } else {
             $criteria->add(EscalanotaPeer::FK_ESTABLECIMIENTO_ID, $this->id);
             EscalanotaPeer::addSelectColumns($criteria);
             $this->collEscalanotas = EscalanotaPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(EscalanotaPeer::FK_ESTABLECIMIENTO_ID, $this->id);
             EscalanotaPeer::addSelectColumns($criteria);
             if (!isset($this->lastEscalanotaCriteria) || !$this->lastEscalanotaCriteria->equals($criteria)) {
                 $this->collEscalanotas = EscalanotaPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastEscalanotaCriteria = $criteria;
     return $this->collEscalanotas;
 }
Exemplo n.º 3
0
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(EscalanotaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(EscalanotaPeer::DATABASE_NAME);
         $criteria->add(EscalanotaPeer::ID, $pks, Criteria::IN);
         $objs = EscalanotaPeer::doSelect($criteria, $con);
     }
     return $objs;
 }