Skip to content

Commit af0efed

Browse files
pimpinclaude
andcommitted
fix: read scan_consistency via instance_variable_get in has_many query_fn
Couchbase::Options::Query exposes only a writer (scan_consistency=), not a reader. Reading options.scan_consistency raises NoMethodError at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 446fa07 commit af0efed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/couchbase-orm/utilities/has_many.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def build_index_n1ql(klass, remote_class, remote_method, through_key, foreign_ke
100100
params = [design_document, values[0]]
101101
cluster.query(n1ql_query, Couchbase::Options::Query.new(
102102
positional_parameters: params,
103-
scan_consistency: options.scan_consistency
103+
scan_consistency: options.instance_variable_get(:@scan_consistency)
104104
))
105105
}
106106
end

0 commit comments

Comments
 (0)