/**
  * Filter the query by a related \Jalle19\StatusManager\Database\User object
  *
  * @param \Jalle19\StatusManager\Database\User|ObjectCollection $user the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildInstanceQuery The current query, for fluid interface
  */
 public function filterByUser($user, $comparison = null)
 {
     if ($user instanceof \Jalle19\StatusManager\Database\User) {
         return $this->addUsingAlias(InstanceTableMap::COL_NAME, $user->getInstanceName(), $comparison);
     } elseif ($user instanceof ObjectCollection) {
         return $this->useUserQuery()->filterByPrimaryKeys($user->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByUser() only accepts arguments of type \\Jalle19\\StatusManager\\Database\\User or Collection');
     }
 }