/** * Get the associated Categories object * * @param PropelPDO Optional Connection object. * @return Categories The associated Categories object. * @throws PropelException */ public function getCategoriesRelatedByCategoryId(PropelPDO $con = null) { if ($this->aCategoriesRelatedByCategoryId === null && $this->category_id !== null) { $this->aCategoriesRelatedByCategoryId = CategoriesPeer::retrieveByPk($this->category_id); /* 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->aCategoriesRelatedByCategoryId->addAdvicesRelatedByCategoryId($this); */ } return $this->aCategoriesRelatedByCategoryId; }