protected function findType($foreignKey, $remote)
    {
        if ($remote) {
            if ($this->isBelongsToMany($foreignKey)) {
                return 'belongsToMany';
            }
            if ($this->isHasOne($foreignKey)) {
                return 'hasOne';
            }

            return 'hasMany';
        } else {
            return 'belongsTo';
        }
    }