/**
  * Declares an association between this object and a ChildInstance object.
  *
  * @param  ChildInstance $v
  * @return $this|\Jalle19\StatusManager\Database\Connection The current object (for fluent API support)
  * @throws PropelException
  */
 public function setInstance(ChildInstance $v = null)
 {
     if ($v === null) {
         $this->setInstanceName(NULL);
     } else {
         $this->setInstanceName($v->getName());
     }
     $this->aInstance = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildInstance object, it will not be re-added.
     if ($v !== null) {
         $v->addConnection($this);
     }
     return $this;
 }
 /**
  * Filter the query by a related \Jalle19\StatusManager\Database\Instance object
  *
  * @param \Jalle19\StatusManager\Database\Instance|ObjectCollection $instance 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 ChildConnectionQuery The current query, for fluid interface
  */
 public function filterByInstance($instance, $comparison = null)
 {
     if ($instance instanceof \Jalle19\StatusManager\Database\Instance) {
         return $this->addUsingAlias(ConnectionTableMap::COL_INSTANCE_NAME, $instance->getName(), $comparison);
     } elseif ($instance instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ConnectionTableMap::COL_INSTANCE_NAME, $instance->toKeyValue('PrimaryKey', 'Name'), $comparison);
     } else {
         throw new PropelException('filterByInstance() only accepts arguments of type \\Jalle19\\StatusManager\\Database\\Instance or Collection');
     }
 }
 /**
  * Exclude object from result
  *
  * @param   ChildInstance $instance Object to remove from the list of results
  *
  * @return $this|ChildInstanceQuery The current query, for fluid interface
  */
 public function prune($instance = null)
 {
     if ($instance) {
         $this->addUsingAlias(InstanceTableMap::COL_NAME, $instance->getName(), Criteria::NOT_EQUAL);
     }
     return $this;
 }