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