コード例 #1
0
 /**
  * Get the associated Room object
  *
  * @param      Connection Optional Connection object.
  * @return     Room The associated Room object.
  * @throws     PropelException
  */
 public function getRoom($con = null)
 {
     // include the related Peer class
     include_once 'src/model/whiteboard/om/BaseRoomPeer.php';
     if ($this->aRoom === null && $this->room_id !== null) {
         $this->aRoom = RoomPeer::retrieveByPK($this->room_id, $con);
         /* The following can be used instead of the line above to
         		   guarantee the related object contains a reference
         		   to this object, but this level of coupling
         		   may be undesirable in many circumstances.
         		   As it can lead to a db query with many results that may
         		   never be used.
         		   $obj = RoomPeer::retrieveByPK($this->room_id, $con);
         		   $obj->addRooms($this);
         		 */
     }
     return $this->aRoom;
 }