コード例 #1
0
 /**
  * Returns a new ChildRBatchForbookQuery object.
  *
  * @param     string $modelAlias The alias of a model in the query
  * @param     Criteria $criteria Optional Criteria to build the query from
  *
  * @return ChildRBatchForbookQuery
  */
 public static function create($modelAlias = null, Criteria $criteria = null)
 {
     if ($criteria instanceof ChildRBatchForbookQuery) {
         return $criteria;
     }
     $query = new ChildRBatchForbookQuery();
     if (null !== $modelAlias) {
         $query->setModelAlias($modelAlias);
     }
     if ($criteria instanceof Criteria) {
         $query->mergeWith($criteria);
     }
     return $query;
 }
コード例 #2
0
ファイル: Books.php プロジェクト: Rokfor/rokfor-php-db
 /**
  * If this collection has already been initialized with
  * an identical criteria, it returns the collection.
  * Otherwise if this Books is new, it will return
  * an empty collection; or if this Books has previously
  * been saved, it will retrieve related RBatchForbooks from storage.
  *
  * This method is protected by default in order to keep the public
  * api reasonable.  You can provide public methods for those you
  * actually need in Books.
  *
  * @param      Criteria $criteria optional Criteria object to narrow the query
  * @param      ConnectionInterface $con optional connection object
  * @param      string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  * @return ObjectCollection|ChildRBatchForbook[] List of ChildRBatchForbook objects
  */
 public function getRBatchForbooksJoinBatch(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN)
 {
     $query = ChildRBatchForbookQuery::create(null, $criteria);
     $query->joinWith('Batch', $joinBehavior);
     return $this->getRBatchForbooks($query, $con);
 }