src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php
public static function retrieveByPK($pk, PropelPDO $con = null)
    {

        if (null !== ($obj = UserCustomerRelationPeer::getInstanceFromPool((string) $pk))) {
            return $obj;
        }

        if ($con === null) {
            $con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }

        $criteria = new Criteria(UserCustomerRelationPeer::DATABASE_NAME);
        $criteria->add(UserCustomerRelationPeer::ID, $pk);

        $v = UserCustomerRelationPeer::doSelect($criteria, $con);

        return !empty($v) > 0 ? $v[0] : null;
    }
public static function retrieveByPK($pk, PropelPDO $con = null)
    {

        if (null !== ($obj = UserCustomerRelationPeer::getInstanceFromPool((string) $pk))) {
            return $obj;
        }

        if ($con === null) {
            $con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }

        $criteria = new Criteria(UserCustomerRelationPeer::DATABASE_NAME);
        $criteria->add(UserCustomerRelationPeer::ID, $pk);

        $v = UserCustomerRelationPeer::doSelect($criteria, $con);

        return !empty($v) > 0 ? $v[0] : null;
    }
public static function retrieveByPK ( $ pk , PropelPDO $ con = null ) { if ( null !== ( $ obj = UserCustomerRelationPeer :: getInstanceFromPool ( ( string ) $ pk ) ) ) { return $ obj ; } if ( $ con === null ) { $ con = Propel :: getConnection ( UserCustomerRelationPeer :: DATABASE_NAME , Propel :: CONNECTION_READ ) ; } $ criteria = new Criteria ( UserCustomerRelationPeer :: DATABASE_NAME ) ; $ criteria -> add ( UserCustomerRelationPeer :: ID , $ pk ) ; $ v = UserCustomerRelationPeer :: doSelect ( $ criteria , $ con ) ; return ! empty ( $ v ) > 0 ? $ v [ 0 ] : null ; }
Retrieve a single object by pkey.

@param int $pk the primary key.
@param      PropelPDO $con the connection to use
@return UserCustomerRelation
Retrieve a single object by pkey .