/**
 * Retrieve object using using composite pkey values.
 * @param      int $user_id
   @param      string $role_id
   
 * @param      PropelPDO $con
 * @return     UserHasRole
 */
 public static function retrieveByPK($user_id, $role_id, PropelPDO $con = null)
 {
     $key = serialize(array((string) $user_id, (string) $role_id));
     if (null !== ($obj = UserHasRolePeer::getInstanceFromPool($key))) {
         return $obj;
     }
     if ($con === null) {
         $con = Propel::getConnection(UserHasRolePeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $criteria = new Criteria(UserHasRolePeer::DATABASE_NAME);
     $criteria->add(UserHasRolePeer::USER_ID, $user_id);
     $criteria->add(UserHasRolePeer::ROLE_ID, $role_id);
     $v = UserHasRolePeer::doSelect($criteria, $con);
     return !empty($v) ? $v[0] : null;
 }