/** * 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'); } }