public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VTotalCatalogPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setColLocationId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setCatCategoryId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setTotalCatalog($arr[$keys[2]]); } }
public static function retrieveByPK($col_location_id, $cat_category_id, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(VTotalCatalogPeer::COL_LOCATION_ID, $col_location_id); $criteria->add(VTotalCatalogPeer::CAT_CATEGORY_ID, $cat_category_id); $v = VTotalCatalogPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }