Пример #1
0
 /**
  * Exclude object from result
  *
  * @param   ChildFileMeta $fileMeta Object to remove from the list of results
  *
  * @return $this|ChildFileMetaQuery The current query, for fluid interface
  */
 public function prune($fileMeta = null)
 {
     if ($fileMeta) {
         $this->addCond('pruneCond0', $this->getAliasedColName(FileMetaTableMap::COL_USER_ATTRIBUTES_IDUSER_ATTRIBUTES), $fileMeta->getUserAttributesIduserAttributes(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(FileMetaTableMap::COL_MEDIAFILE_IDMEDIAFILE), $fileMeta->getMediafileIdmediafile(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }
Пример #2
0
 /**
  * Filter the query by a related \FileMeta object
  *
  * @param \FileMeta|ObjectCollection $fileMeta the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildUserAttributesQuery The current query, for fluid interface
  */
 public function filterByFileMeta($fileMeta, $comparison = null)
 {
     if ($fileMeta instanceof \FileMeta) {
         return $this->addUsingAlias(UserAttributesTableMap::COL_IDUSER_ATTRIBUTES, $fileMeta->getUserAttributesIduserAttributes(), $comparison);
     } elseif ($fileMeta instanceof ObjectCollection) {
         return $this->useFileMetaQuery()->filterByPrimaryKeys($fileMeta->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByFileMeta() only accepts arguments of type \\FileMeta or Collection');
     }
 }