We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e70205 commit ccc2e82Copy full SHA for ccc2e82
1 file changed
lib/pg_search/scope_options.rb
@@ -101,7 +101,12 @@ def order_within_rank
101
end
102
103
def primary_key
104
- "#{quoted_table_name}.#{connection.quote_column_name(model.primary_key)}"
+ if model.primary_key.is_a?(Array)
105
+ model.primary_key.map { |part| "#{quoted_table_name}.#{connection.quote_column_name(part)}" }
106
+ .join(',')
107
+ else
108
+ "#{quoted_table_name}.#{connection.quote_column_name(model.primary_key)}"
109
+ end
110
111
112
def subquery_join
0 commit comments