Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

rails/rails#6792

View gist:4138250
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
head@railsmaster [ distinct ~/git/rails/activerecord]$ ARCONN=oracle ruby -Itest test/cases/associations/join_model_test.rb -n test_eager_load_has_many_through_has_many
Using oracle
Run options: -n test_eager_load_has_many_through_has_many --seed 57819
 
# Running tests:
 
E
 
Finished tests in 0.661433s, 1.5119 tests/s, 0.0000 assertions/s.
 
1) Error:
test_eager_load_has_many_through_has_many(AssociationsJoinModelTest):
ActiveRecord::StatementInvalid: OCIError: ORA-01791: not a SELECTed expression: SELECT * FROM (SELECT DISTINCT "AUTHORS".id, FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__ FROM "AUTHORS" LEFT OUTER JOIN "POSTS" ON "POSTS"."AUTHOR_ID" = "AUTHORS"."ID" LEFT OUTER JOIN "COMMENTS" ON "COMMENTS"."POST_ID" = "POSTS"."ID" WHERE (name = 'David') ORDER BY comments.id) WHERE ROWNUM <= 1
stmt.c:230:in oci8lib_200.so
/home/yahonda/.rvm/gems/ruby-head@railsmaster/gems/ruby-oci8-2.1.3/lib/oci8/cursor.rb:126:in `exec'
/home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:143:in `exec'
/home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:643:in `block in exec_query'
/home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:305:in `block in log'
/home/yahonda/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:300:in `log'
/home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1353:in `log'
/home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:623:in `exec_query'
/home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1307:in `select'
/home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
/home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
/home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:39:in `block in find_by_sql'
/home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:35:in `logging_query_plan'
/home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:49:in `find_by_sql'
/home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:568:in `exec_queries'
/home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:459:in `block in load'
/home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:35:in `logging_query_plan'
/home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:459:in `load'
/home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:197:in `to_a'
/home/yahonda/git/rails/activerecord/lib/active_record/relation/delegation.rb:6:in `collect'
/home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:231:in `construct_limited_ids_condition'
/home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:215:in `apply_join_dependency'
/home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:204:in `construct_relation_for_association_find'
/home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:183:in `find_with_associations'
/home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:568:in `exec_queries'
/home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:459:in `block in load'
/home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:35:in `logging_query_plan'
/home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:459:in `load'
/home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:197:in `to_a'
/home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:313:in `find_first'
/home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:90:in `first'
/home/yahonda/.rvm/gems/ruby-head@railsmaster/bundler/gems/activerecord-deprecated_finders-dd99c375c44b/lib/active_record/deprecated_finders/relation.rb:130:in `first'
test/cases/associations/join_model_test.rb:412:in `test_eager_load_has_many_through_has_many'
 
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
Owner
  • SQL Without #6792 fix / without Oracle enhanced adapter commit
    SELECT * FROM (SELECT DISTINCT "AUTHORS".id, FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__ FROM "AUTHORS" LEFT OUTER JOIN "POSTS" ON "POSTS"."AUTHOR_ID" = "AUTHORS"."ID" LEFT OUTER JOIN "COMMENTS" ON "COMMENTS"."POST_ID" = "POSTS"."ID" WHERE (name = 'David') ORDER BY alias_0__) WHERE ROWNUM <= 1

  • SQL With #6792 fix and Oracle enhanced adapter commit
    SELECT * FROM (SELECT DISTINCT "AUTHORS".id, FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__ FROM "AUTHORS" LEFT OUTER JOIN "POSTS" ON "POSTS"."AUTHOR_ID" = "AUTHORS"."ID" LEFT OUTER JOIN "COMMENTS" ON "COMMENTS"."POST_ID" = "POSTS"."ID" WHERE (name = 'David') ORDER BY comments.id) WHERE ROWNUM <= 1

Don't have Oracle set up to debug, but def seems we're not reaching this line https://github.com/rails/arel/blob/master/lib/arel/visitors/oracle.rb#L103 for some reason or other.

Owner
head@railsmaster [ distinct ~/git/rails/activerecord]$ ARCONN=oracle ruby -Itest test/cases/associations/join_model_test.rb -n test_eager_load_has_many_through_has_many
Using oracle
Run options: -n test_eager_load_has_many_through_has_many --seed 34482

# Running tests:

E

Finished tests in 0.659722s, 1.5158 tests/s, 0.0000 assertions/s.

  1) Error:
test_eager_load_has_many_through_has_many(AssociationsJoinModelTest):
ActiveRecord::StatementInvalid: OCIError: ORA-00936: missing expression: SELECT * FROM (SELECT  DiStInCt DISTINCT "AUTHORS".id, FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__ FROM "AUTHORS" LEFT OUTER JOIN "POSTS" ON "POSTS"."AUTHOR_ID" = "AUTHORS"."ID" LEFT OUTER JOIN "COMMENTS" ON "COMMENTS"."POST_ID" = "POSTS"."ID" WHERE (name = 'David')  ORDER BY alias_0__) WHERE ROWNUM <= 1
    stmt.c:230:in oci8lib_200.so
    /home/yahonda/.rvm/gems/ruby-head@railsmaster/gems/ruby-oci8-2.1.3/lib/oci8/cursor.rb:126:in `exec'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:143:in `exec'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:643:in `block in exec_query'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:305:in `block in log'
    /home/yahonda/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:300:in `log'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1354:in `log'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:623:in `exec_query'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1308:in `select'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
    /home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:39:in `block in find_by_sql'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:35:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:49:in `find_by_sql'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:568:in `exec_queries'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:459:in `block in load'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:35:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:459:in `load'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:197:in `to_a'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/delegation.rb:6:in `collect'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:231:in `construct_limited_ids_condition'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:215:in `apply_join_dependency'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:204:in `construct_relation_for_association_find'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:183:in `find_with_associations'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:568:in `exec_queries'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:459:in `block in load'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:35:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:459:in `load'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:197:in `to_a'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:313:in `find_first'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:90:in `first'
    /home/yahonda/.rvm/gems/ruby-head@railsmaster/bundler/gems/activerecord-deprecated_finders-dd99c375c44b/lib/active_record/deprecated_finders/relation.rb:130:in `first'
    test/cases/associations/join_model_test.rb:412:in `test_eager_load_has_many_through_has_many'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
$
Owner
SELECT * FROM (SELECT  DiStInCt DISTINCT "AUTHORS".id, FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__ FROM "AUTHORS" LEFT OUTER JOIN "POSTS" ON "POSTS"."AUTHOR_ID" = "AUTHORS"."ID" LEFT OUTER JOIN "COMMENTS" ON "COMMENTS"."POST_ID" = "POSTS"."ID" WHERE (name = 'David')  ORDER BY alias_0__) WHERE ROWNUM <= 1
Owner
$ git diff
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb
index c4c2e6f..0812ed6 100644
--- a/lib/arel/visitors/to_sql.rb
+++ b/lib/arel/visitors/to_sql.rb
@@ -51,7 +51,7 @@ module Arel
       WINDOW   = ' WINDOW '   # :nodoc:
       AND      = ' AND '      # :nodoc:

-      DISTINCT = 'DISTINCT'   # :nodoc:
+      DISTINCT = 'DiStInCt'   # :nodoc:

       attr_accessor :last_column
Owner

Thanks for the info. My first implementation did not execute https://github.com/rails/arel/blob/master/lib/arel/visitors/oracle.rb#L103 .
After changing DISTINCT appears twice. I've found that first one ('DiStInCt') added by Arel as above, second one added
https://github.com/yahonda/oracle-enhanced/blob/08eb43e5165ab92bdfe1ec52e17e0214cc2c4bf3/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb#L1251

Without sql = "DISTINCT #{columns},, Arel oracle.rb#L103 is not executed. Still investigating.

Yeah - the intended interaction with AREL is that we select(array_of_columns_without_distinct) while also setting uniq_value leads to a call of #distinct(true) on arel (thus adding the DiStInCt).

I guess what we need to understand is why giving an array of values to select is resulting in oracle.rb#L103.

One question I have is: does it work if you just provide a string of comma-separated values (without distinct), rather than array?

That is, resulting in not running oracle.rb#L103. What I would do if I had oracle running on my machine, apart from trying the string of comma-separated values, would be to run the debugger with breakpoints in the code running up to oracle.rb#L103 in each case to see why it's not being run in the array case.

Owner
One question I have is: does it work if you just provide a string of comma-separated values (without distinct), rather than array?

Let me try.

Owner

To make it clear, I made a similar refactoring done by https://github.com/rails/rails/commit/2197e1f36575d90712da62abd6cbc27bf1feba6b#activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb to Oracle enhanced adapter. You can see the refactoring distinct method at https://github.com/yahonda/oracle-enhanced/commit/458e177442a5446063bac15a9db54df089da5e79. This refactoring does not cause regressions.

Then implemented a distinct_columns method at Oracle enhanced adapter https://github.com/yahonda/oracle-enhanced/commit/9fed43acdee5929a59d4b6f05da8954591418bf2 and cherry pick a commit at rails/rails#6792 to rails.

If I understand your proposal correctly, both Array and Strings causes same errors. I'll update test logs and error stacks below.

Owner
  • Return as String
$ ARCONN=oracle ruby -Itest test/cases/associations/join_model_test.rb -n test_eager_load_has_many_through_has_many
Using oracle
Run options: -n test_eager_load_has_many_through_has_many --seed 47746

# Running tests:

String
"AUTHORS".id, FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__
E

Finished tests in 0.688383s, 1.4527 tests/s, 0.0000 assertions/s.

  1) Error:
test_eager_load_has_many_through_has_many(AssociationsJoinModelTest):
ActiveRecord::StatementInvalid: OCIError: ORA-01791: not a SELECTed expression: SELECT * FROM (SELECT  DISTINCT "AUTHORS".id, FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__ FROM "AUTHORS" LEFT OUTER JOIN "POSTS" ON "POSTS"."AUTHOR_ID" = "AUTHORS"."ID" LEFT OUTER JOIN "COMMENTS" ON "COMMENTS"."POST_ID" = "POSTS"."ID" WHERE (name = 'David')  ORDER BY comments.id) WHERE ROWNUM <= 1
    stmt.c:230:in oci8lib_200.so
    /home/yahonda/.rvm/gems/ruby-head@railsmaster/gems/ruby-oci8-2.1.3/lib/oci8/cursor.rb:126:in `exec'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:143:in `exec'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:643:in `block in exec_query'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:305:in `block in log'
    /home/yahonda/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:300:in `log'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1354:in `log'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:623:in `exec_query'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1308:in `select'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
    /home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:39:in `block in find_by_sql'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:36:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:49:in `find_by_sql'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:565:in `exec_queries'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:456:in `block in load'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:36:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:456:in `load'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:197:in `to_a'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/delegation.rb:6:in `collect'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:231:in `construct_limited_ids_condition'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:215:in `apply_join_dependency'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:204:in `construct_relation_for_association_find'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:183:in `find_with_associations'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:565:in `exec_queries'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:456:in `block in load'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:36:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:456:in `load'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:197:in `to_a'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:313:in `find_first'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:90:in `first'
    /home/yahonda/.rvm/gems/ruby-head@railsmaster/bundler/gems/activerecord-deprecated_finders-dd99c375c44b/lib/active_record/deprecated_finders/relation.rb:130:in `first'
    test/cases/associations/join_model_test.rb:412:in `test_eager_load_has_many_through_has_many'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
$
Owner
  • Return as Array
$ ARCONN=oracle ruby -Itest test/cases/associations/join_model_test.rb -n test_eager_load_has_many_through_has_many
Using oracle
Run options: -n test_eager_load_has_many_through_has_many --seed 325

# Running tests:

Array
"AUTHORS".id
FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__
E

Finished tests in 0.662780s, 1.5088 tests/s, 0.0000 assertions/s.

  1) Error:
test_eager_load_has_many_through_has_many(AssociationsJoinModelTest):
ActiveRecord::StatementInvalid: OCIError: ORA-01791: not a SELECTed expression: SELECT * FROM (SELECT  DISTINCT "AUTHORS".id, FIRST_VALUE(comments.id) OVER (PARTITION BY "AUTHORS".id ORDER BY comments.id) AS alias_0__ FROM "AUTHORS" LEFT OUTER JOIN "POSTS" ON "POSTS"."AUTHOR_ID" = "AUTHORS"."ID" LEFT OUTER JOIN "COMMENTS" ON "COMMENTS"."POST_ID" = "POSTS"."ID" WHERE (name = 'David')  ORDER BY comments.id) WHERE ROWNUM <= 1
    stmt.c:230:in oci8lib_200.so
    /home/yahonda/.rvm/gems/ruby-head@railsmaster/gems/ruby-oci8-2.1.3/lib/oci8/cursor.rb:126:in `exec'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:143:in `exec'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:643:in `block in exec_query'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:305:in `block in log'
    /home/yahonda/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:300:in `log'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1354:in `log'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:623:in `exec_query'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1308:in `select'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
    /home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:39:in `block in find_by_sql'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:36:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:49:in `find_by_sql'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:565:in `exec_queries'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:456:in `block in load'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:36:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:456:in `load'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:197:in `to_a'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/delegation.rb:6:in `collect'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:231:in `construct_limited_ids_condition'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:215:in `apply_join_dependency'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:204:in `construct_relation_for_association_find'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:183:in `find_with_associations'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:565:in `exec_queries'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:456:in `block in load'
    /home/yahonda/git/rails/activerecord/lib/active_record/explain.rb:36:in `logging_query_plan'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:456:in `load'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:197:in `to_a'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:313:in `find_first'
    /home/yahonda/git/rails/activerecord/lib/active_record/relation/finder_methods.rb:90:in `first'
    /home/yahonda/.rvm/gems/ruby-head@railsmaster/bundler/gems/activerecord-deprecated_finders-dd99c375c44b/lib/active_record/deprecated_finders/relation.rb:130:in `first'
    test/cases/associations/join_model_test.rb:412:in `test_eager_load_has_many_through_has_many'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
$
Owner

Now debugger works in my environment. Will debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.