예제 #1
0
 /**
  * Get the associated Categories object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Categories The associated Categories object.
  * @throws     PropelException
  */
 public function getCategoriesRelatedByCategoryUpcategoryId(PropelPDO $con = null)
 {
     if ($this->aCategoriesRelatedByCategoryUpcategoryId === null && $this->category_upcategory_id !== null) {
         $c = new Criteria(CategoriesPeer::DATABASE_NAME);
         $c->add(CategoriesPeer::CATEGORYUP_ID, $this->category_upcategory_id);
         $this->aCategoriesRelatedByCategoryUpcategoryId = CategoriesPeer::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->aCategoriesRelatedByCategoryUpcategoryId->addAdvicesRelatedByCategoryUpcategoryId($this);
         		 */
     }
     return $this->aCategoriesRelatedByCategoryUpcategoryId;
 }