Esempio n. 1
0
 /**
  * Update a document purchase record.
  * 
  * The goiven model must have a valid value for the id property or the update will fail.
  * 
  * @param \Application\Model\Purchase $oPurchase
  */
 public function update(Purchase $oPurchase)
 {
     $aProperties = $oPurchase->toArray();
     //No need to update the created on column for the document purchase record.
     unset($aProperties[Purchase::CREATED_ON]);
     $this->oTableGateway->update($aProperties, array(Purchase::ID => $oPurchase->getId()));
 }