/** * Retrieve object using using composite pkey values. * @param int $file_id * @param int $dest_user_id * @param PropelPDO $con * @return DropboxPost */ public static function retrieveByPK($file_id, $dest_user_id, PropelPDO $con = null) { $_instancePoolKey = serialize(array((string) $file_id, (string) $dest_user_id)); if (null !== ($obj = DropboxPostPeer::getInstanceFromPool($_instancePoolKey))) { return $obj; } if ($con === null) { $con = Propel::getConnection(DropboxPostPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $criteria = new Criteria(DropboxPostPeer::DATABASE_NAME); $criteria->add(DropboxPostPeer::FILE_ID, $file_id); $criteria->add(DropboxPostPeer::DEST_USER_ID, $dest_user_id); $v = DropboxPostPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }