Beispiel #1
0
 /**
  * Get the associated Sales object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Sales The associated Sales object.
  * @throws     PropelException
  */
 public function getSales(PropelPDO $con = null)
 {
     if ($this->aSales === null && $this->sales_id !== null) {
         $c = new Criteria(SalesPeer::DATABASE_NAME);
         $c->add(SalesPeer::ID, $this->sales_id);
         $this->aSales = SalesPeer::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->aSales->addPurchaseDetails($this);
         		 */
     }
     return $this->aSales;
 }