protected function getNullForeignKeyFromRelation(string $relation): array
    {
        $key = $this->entityMap->getLocalKeys($relation);

        if (is_array($key)) {
            return $this->entityMap->getEmptyValueForLocalKey($relation);
        }

        if (is_null($key)) {
            throw new MappingException("Foreign key for relation $relation cannot be null");
        }

        return [
            $key => $this->entityMap->getEmptyValueForLocalKey($relation),
        ];
    }
protected function getNullForeignKeyFromRelation(string $relation): array
    {
        $key = $this->entityMap->getLocalKeys($relation);

        if (is_array($key)) {
            return $this->entityMap->getEmptyValueForLocalKey($relation);
        }

        if (is_null($key)) {
            throw new MappingException("Foreign key for relation $relation cannot be null");
        }

        return [
            $key => $this->entityMap->getEmptyValueForLocalKey($relation),
        ];
    }
protected function getNullForeignKeyFromRelation ( string $ relation ) : array { $ key = $ this -> entityMap -> getLocalKeys ( $ relation ) ; if ( is_array ( $ key ) ) { return $ this -> entityMap -> getEmptyValueForLocalKey ( $ relation ) ; } if ( is_null ( $ key ) ) { throw new MappingException ( "Foreign key for relation $relation cannot be null" ) ; } return [ $ key => $ this -> entityMap -> getEmptyValueForLocalKey ( $ relation ) , ] ; }
Get a null foreign key value pair for an empty relationship.

@param string $relation

@throws MappingException

@return array
Get a null foreign key value pair for an empty relationship .