예제 #1
0
파일: Customer.php 프로젝트: xama5/uver-erp
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aPerson) {
         $this->aPerson->removeCustomer($this);
     }
     $this->id = null;
     $this->person_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
예제 #2
0
파일: Employee.php 프로젝트: xama5/uver-erp
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aPerson) {
         $this->aPerson->removeEmployee($this);
     }
     $this->id = null;
     $this->hours = null;
     $this->wage = null;
     $this->person_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
예제 #3
0
 /**
  * Filter the query by a related \Person object
  *
  * @param \Person|ObjectCollection $person The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildCustomerQuery The current query, for fluid interface
  */
 public function filterByPerson($person, $comparison = null)
 {
     if ($person instanceof \Person) {
         return $this->addUsingAlias(CustomerTableMap::COL_PERSON_ID, $person->getId(), $comparison);
     } elseif ($person instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CustomerTableMap::COL_PERSON_ID, $person->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPerson() only accepts arguments of type \\Person or Collection');
     }
 }
예제 #4
0
 /**
  * Exclude object from result
  *
  * @param   ChildPerson $person Object to remove from the list of results
  *
  * @return $this|ChildPersonQuery The current query, for fluid interface
  */
 public function prune($person = null)
 {
     if ($person) {
         $this->addUsingAlias(PersonTableMap::COL_ID, $person->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }