Exemplo n.º 1
0
 /**
  * Get the associated User object
  *
  * @param PropelPDO $con Optional Connection object.
  * @param $doQuery Executes a query to get the object if required
  * @return User The associated User object.
  * @throws PropelException
  */
 public function getUser(PropelPDO $con = null, $doQuery = true)
 {
     if ($this->aUser === null && $this->id !== null && $doQuery) {
         $this->aUser = UserQuery::create()->findPk($this->id, $con);
         // Because this foreign key represents a one-to-one relationship, we will create a bi-directional association.
         $this->aUser->setUserProfile($this);
     }
     return $this->aUser;
 }