src/Slashworks/BackendBundle/Model/om/BaseUserRolePeer.php
public static function retrieveByPK($user_id, $role_id, PropelPDO $con = null) {
        $_instancePoolKey = serialize(array((string) $user_id, (string) $role_id));
         if (null !== ($obj = UserRolePeer::getInstanceFromPool($_instancePoolKey))) {
             return $obj;
        }

        if ($con === null) {
            $con = Propel::getConnection(UserRolePeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }
        $criteria = new Criteria(UserRolePeer::DATABASE_NAME);
        $criteria->add(UserRolePeer::USER_ID, $user_id);
        $criteria->add(UserRolePeer::ROLE_ID, $role_id);
        $v = UserRolePeer::doSelect($criteria, $con);

        return !empty($v) ? $v[0] : null;
    }
public static function retrieveByPK($user_id, $role_id, PropelPDO $con = null) {
        $_instancePoolKey = serialize(array((string) $user_id, (string) $role_id));
         if (null !== ($obj = UserRolePeer::getInstanceFromPool($_instancePoolKey))) {
             return $obj;
        }

        if ($con === null) {
            $con = Propel::getConnection(UserRolePeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }
        $criteria = new Criteria(UserRolePeer::DATABASE_NAME);
        $criteria->add(UserRolePeer::USER_ID, $user_id);
        $criteria->add(UserRolePeer::ROLE_ID, $role_id);
        $v = UserRolePeer::doSelect($criteria, $con);

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