コード例 #1
0
ファイル: InformationAsked.php プロジェクト: sh6210/travel
 /**
  * Builds a Criteria object containing the primary key for this object.
  *
  * Unlike buildCriteria() this method includes the primary key values regardless
  * of whether or not they have been modified.
  *
  * @throws LogicException if no primary key is defined
  *
  * @return Criteria The Criteria object containing value(s) for primary key(s).
  */
 public function buildPkeyCriteria()
 {
     $criteria = ChildInformationAskedQuery::create();
     $criteria->add(InformationAskedTableMap::COL_ID, $this->id);
     return $criteria;
 }
コード例 #2
0
 /**
  * Returns a new ChildInformationAskedQuery object.
  *
  * @param     string $modelAlias The alias of a model in the query
  * @param     Criteria $criteria Optional Criteria to build the query from
  *
  * @return ChildInformationAskedQuery
  */
 public static function create($modelAlias = null, Criteria $criteria = null)
 {
     if ($criteria instanceof ChildInformationAskedQuery) {
         return $criteria;
     }
     $query = new ChildInformationAskedQuery();
     if (null !== $modelAlias) {
         $query->setModelAlias($modelAlias);
     }
     if ($criteria instanceof Criteria) {
         $query->mergeWith($criteria);
     }
     return $query;
 }
コード例 #3
0
ファイル: User.php プロジェクト: sh6210/travel
 /**
  * Returns the number of related InformationAsked objects.
  *
  * @param      Criteria $criteria
  * @param      boolean $distinct
  * @param      ConnectionInterface $con
  * @return int             Count of related InformationAsked objects.
  * @throws PropelException
  */
 public function countInformationAskeds(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
 {
     $partial = $this->collInformationAskedsPartial && !$this->isNew();
     if (null === $this->collInformationAskeds || null !== $criteria || $partial) {
         if ($this->isNew() && null === $this->collInformationAskeds) {
             return 0;
         }
         if ($partial && !$criteria) {
             return count($this->getInformationAskeds());
         }
         $query = ChildInformationAskedQuery::create(null, $criteria);
         if ($distinct) {
             $query->distinct();
         }
         return $query->filterByUser($this)->count($con);
     }
     return count($this->collInformationAskeds);
 }