コード例 #1
0
 public static function prepareCriteriaForSelect(Criteria $criteria)
 {
     if ($criteria->hasSelectClause()) {
         $asColumns = $criteria->getAsColumns();
         if (count($asColumns) == 1 && isset($asColumns['_score'])) {
             $criteria = clone $criteria;
             DeliveryProfilePeer::addSelectColumns($criteria);
         }
     } else {
         $criteria = clone $criteria;
         DeliveryProfilePeer::addSelectColumns($criteria);
     }
     // Set the correct dbName
     $criteria->setDbName(self::DATABASE_NAME);
     // attach default criteria
     DeliveryProfilePeer::attachCriteriaFilter($criteria);
     return $criteria;
 }