Ejemplo n.º 1
0
 /**
  * Get the associated CpStates object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     CpStates The associated CpStates object.
  * @throws     PropelException
  */
 public function getCpStates(PropelPDO $con = null)
 {
     if ($this->aCpStates === null && $this->state_id !== null) {
         $c = new Criteria(CpStatesPeer::DATABASE_NAME);
         $c->add(CpStatesPeer::ID, $this->state_id);
         $this->aCpStates = CpStatesPeer::doSelectOne($c, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aCpStates->addCpCitiess($this);
         		 */
     }
     return $this->aCpStates;
 }