From d842ff37d63e5a42b96fa13c65ca43973935444e Mon Sep 17 00:00:00 2001 From: Alexandre Lairan Date: Mon, 24 Jan 2022 11:05:52 +0100 Subject: [PATCH] Handle Sequel::SQL::QualifiedIdentifier schema name for join --- lib/rom/sql/relation/reading.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rom/sql/relation/reading.rb b/lib/rom/sql/relation/reading.rb index a30cfc42..37ea3f6c 100644 --- a/lib/rom/sql/relation/reading.rb +++ b/lib/rom/sql/relation/reading.rb @@ -1096,6 +1096,8 @@ def __join__(type, other, join_cond = EMPTY_HASH, opts = EMPTY_HASH, &block) end elsif other.is_a?(Sequel::SQL::AliasedExpression) new(dataset.__send__(type, other, join_cond, opts, &block)) + elsif other.is_a?(Sequel::SQL::QualifiedIdentifier) + __join__(type, ROM::Relation::Name.new(other), join_cond.transform_keys(&:qualified), opts, &block) elsif other.respond_to?(:name) && other.name.is_a?(Relation::Name) if block join_cond = JoinDSL.new(schema).(&block)