Skip to content

Commit 9d93f40

Browse files
committed
only do the patched select_limited_ids if connection is Derby's
1 parent 41e294b commit 9d93f40

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/arjdbc/derby/active_record_patch.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Needed because Rails is broken wrt to quoting of some values.
2-
# Most databases are nice about it, but not Derby.
1+
# Needed because Rails is broken wrt to quoting of some values.
2+
# Most databases are nice about it, but not Derby.
33
# The real issue is that you can't compare a CHAR value to a NUMBER column.
44
ActiveRecord::Associations::ClassMethods.module_eval do
55
private
66
def select_limited_ids_list(options, join_dependency)
7+
return super unless connection.is_a?(ArJdbc::Derby)
78
connection.select_all(
89
construct_finder_sql_for_association_limiting(options, join_dependency),
910
"#{name} Load IDs For Limited Eager Loading"

0 commit comments

Comments
 (0)