Example #1
0
 /**
  * Declares an association between this object and a ChildObject object.
  *
  * @param  ChildObject $v
  * @return $this|\ObjectServices The current object (for fluent API support)
  * @throws PropelException
  */
 public function setObject(ChildObject $v = null)
 {
     if ($v === null) {
         $this->setIdObject(NULL);
     } else {
         $this->setIdObject($v->getId());
     }
     $this->aObject = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildObject object, it will not be re-added.
     if ($v !== null) {
         $v->addObjectServices($this);
     }
     return $this;
 }
Example #2
0
 /**
  * Filter the query by a related \Object object
  *
  * @param \Object|ObjectCollection $object 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 ChildObjectServicesQuery The current query, for fluid interface
  */
 public function filterByObject($object, $comparison = null)
 {
     if ($object instanceof \Object) {
         return $this->addUsingAlias(ObjectServicesTableMap::COL_ID_OBJECT, $object->getId(), $comparison);
     } elseif ($object instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ObjectServicesTableMap::COL_ID_OBJECT, $object->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByObject() only accepts arguments of type \\Object or Collection');
     }
 }
Example #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildObject $object Object to remove from the list of results
  *
  * @return $this|ChildObjectQuery The current query, for fluid interface
  */
 public function prune($object = null)
 {
     if ($object) {
         $this->addUsingAlias(ObjectTableMap::COL_ID, $object->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }