protected function relationNeedsProxy($relation, $attributes)
    {
        if (in_array($relation, $this->entityMap->getRelationshipsWithoutProxy())) {
            return false;
        }

        $localKey = $this->entityMap->getLocalKeys($relation);

        if (is_null($localKey)) {
            return true;
        }

        if (is_array($localKey)) {
            $localKey = $localKey['id'];
        }

        if (!isset($attributes[$localKey]) || is_null($attributes[$localKey])) {
            return false;
        }

        return true;
    }
protected function relationNeedsProxy($relation, $attributes)
    {
        if (in_array($relation, $this->entityMap->getRelationshipsWithoutProxy())) {
            return false;
        }

        $localKey = $this->entityMap->getLocalKeys($relation);

        if (is_null($localKey)) {
            return true;
        }

        if (is_array($localKey)) {
            $localKey = $localKey['id'];
        }

        if (!isset($attributes[$localKey]) || is_null($attributes[$localKey])) {
            return false;
        }

        return true;
    }
protected function relationNeedsProxy ( $ relation , $ attributes ) { if ( in_array ( $ relation , $ this -> entityMap -> getRelationshipsWithoutProxy ( ) ) ) { return false ; } $ localKey = $ this -> entityMap -> getLocalKeys ( $ relation ) ; if ( is_null ( $ localKey ) ) { return true ; } if ( is_array ( $ localKey ) ) { $ localKey = $ localKey [ 'id' ] ; } if ( ! isset ( $ attributes [ $ localKey ] ) || is_null ( $ attributes [ $ localKey ] ) ) { return false ; } return true ; }
Determine if the relation needs a proxy or not.

@param string $relation
@param array  $attributes

@return bool
Determine if the relation needs a proxy or not .