Skip to content

Instantly share code, notes, and snippets.

@kingdonb
Created February 15, 2020 19:02
Show Gist options
  • Save kingdonb/cb702aa7e21d3e08f7f91e54cee81d8d to your computer and use it in GitHub Desktop.
Save kingdonb/cb702aa7e21d3e08f7f91e54cee81d8d to your computer and use it in GitHub Desktop.
ActiveRecord 5.2.4.1 with the latest composite_primary_keys gem, test output on Oracle 18.4.0 (XE)
Finished in 9.115729s, 20.8431 runs/s, 53.3144 assertions/s.
1) Error:
TestDelete#test_delete_all_with_join:
ActiveRecord::StatementInvalid: OCIError: ORA-00904: "DEPARTMENTS"."[:department_id, :location_id]": invalid identifier: DELETE FROM "DEPARTMENTS" WHERE (departments.department_id, departments.location_id) IN (SELECT departments.department_id, departments.location_id FROM "DEPARTMENTS" INNER JOIN "EMPLOYEES" ON "EMPLOYEES"."[:department_id, :location_id]" = "DEPARTMENTS"."[:department_id, :location_id]" WHERE (departments.department_id = 1) AND (departments.location_id = 1))
stmt.c:267:in oci8lib_260.bundle
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/ruby-oci8-2.2.8/lib/oci8/cursor.rb:137:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:144:in `exec_update'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:152:in `block in exec_update'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/dbms_output.rb:36:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:136:in `exec_update'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:176:in `delete'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:21:in `delete'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/relation.rb:82:in `delete_all'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/test/test_delete.rb:39:in `test_delete_all_with_join'
2) Error:
TestCalculations#test_count_includes:
ActiveRecord::StatementInvalid: OCIError: ORA-00904: "DORMS"."[:id]": invalid identifier: SELECT COUNT(DISTINCT "DORMS"."ID") FROM "DORMS" LEFT OUTER JOIN "ROOMS" ON "ROOMS"."DORM_ID" = "DORMS"."[:id]" WHERE (rooms.room_id = 2)
stmt.c:267:in oci8lib_260.bundle
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/ruby-oci8-2.2.8/lib/oci8/cursor.rb:131:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:140:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:41:in `block in exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/dbms_output.rb:36:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:24:in `exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:478:in `select'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:106:in `select_all'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:286:in `block in execute_simple_calculation'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:286:in `execute_simple_calculation'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:238:in `perform_calculation'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:146:in `calculate'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:144:in `calculate'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:52:in `count'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/test/test_calculations.rb:29:in `test_count_includes'
3) Error:
TestCalculations#test_count_includes_dup_columns:
ActiveRecord::StatementInvalid: OCIError: ORA-00904: "TARIFFS"."tariff_id,start_date": invalid identifier: SELECT COUNT(*) FROM (SELECT DISTINCT "TARIFFS"."TARIFF_ID", "TARIFFS"."START_DATE" FROM "TARIFFS" LEFT OUTER JOIN "PRODUCT_TARIFFS" ON "PRODUCT_TARIFFS"."[:tariff_id, :tariff_start_date]" = "TARIFFS"."tariff_id,start_date" WHERE (product_tariffs.tariff_id = 2)) subquery_for_count
stmt.c:267:in oci8lib_260.bundle
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/ruby-oci8-2.2.8/lib/oci8/cursor.rb:131:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:140:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:41:in `block in exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/dbms_output.rb:36:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:24:in `exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:478:in `select'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:106:in `select_all'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/relation/calculations.rb:47:in `block in execute_simple_calculation'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/relation/calculations.rb:47:in `execute_simple_calculation'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:238:in `perform_calculation'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:146:in `calculate'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:144:in `calculate'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/calculations.rb:52:in `count'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/test/test_calculations.rb:34:in `test_count_includes_dup_columns'
4) Error:
TestCreate#test_create_generated_keys:
ActiveRecord::NotNullViolation: OCIError: ORA-01400: cannot insert NULL into ("SYSTEM"."SUBURBS"."CITY_ID"): INSERT INTO "SUBURBS" ("NAME") VALUES (:a1)
stmt.c:267:in oci8lib_260.bundle
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/ruby-oci8-2.2.8/lib/oci8/cursor.rb:137:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:144:in `exec_update'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:120:in `block in exec_insert'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/dbms_output.rb:36:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:97:in `exec_insert'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb:6:in `insert'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:21:in `insert'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:89:in `insert'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/persistence.rb:187:in `_insert_record'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/persistence.rb:64:in `_create_record'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/counter_cache.rb:184:in `_create_record'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/locking/optimistic.rb:70:in `_create_record'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/attribute_methods/dirty.rb:140:in `_create_record'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/callbacks.rb:346:in `block in _create_record'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:816:in `_run_create_callbacks'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/callbacks.rb:346:in `_create_record'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/timestamp.rb:102:in `_create_record'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/persistence.rb:705:in `create_or_update'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/callbacks.rb:342:in `block in create_or_update'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/callbacks.rb:816:in `_run_save_callbacks'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/callbacks.rb:342:in `create_or_update'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/persistence.rb:308:in `save!'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/validations.rb:52:in `save!'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:315:in `block in save!'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:212:in `transaction'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/transactions.rb:315:in `save!'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/suppressor.rb:48:in `save!'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/persistence.rb:53:in `create!'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/test/test_create.rb:56:in `test_create_generated_keys'
5) Error:
TestAssociations#test_new_style_includes_with_conditions:
ActiveRecord::StatementInvalid: OCIError: ORA-00904: "PRODUCT_TARIFFS"."[:tariff_id, :tariff_start_date]": invalid identifier: SELECT "PRODUCT_TARIFFS"."PRODUCT_ID" AS t0_r0, "PRODUCT_TARIFFS"."TARIFF_ID" AS t0_r1, "PRODUCT_TARIFFS"."TARIFF_START_DATE" AS t0_r2, "TARIFFS"."TARIFF_ID" AS t1_r0, "TARIFFS"."START_DATE" AS t1_r1, "TARIFFS"."AMOUNT" AS t1_r2, "TARIFFS"."CREATED_AT" AS t1_r3, "TARIFFS"."UPDATED_AT" AS t1_r4, "PRODUCT_TARIFFS"."PRODUCT_ID" AS t0_r0, "PRODUCT_TARIFFS"."TARIFF_ID" AS t0_r1, "PRODUCT_TARIFFS"."TARIFF_START_DATE" AS t0_r2, "TARIFFS"."TARIFF_ID" AS t1_r0, "TARIFFS"."START_DATE" AS t1_r1, "TARIFFS"."AMOUNT" AS t1_r2, "TARIFFS"."CREATED_AT" AS t1_r3, "TARIFFS"."UPDATED_AT" AS t1_r4 FROM "PRODUCT_TARIFFS" LEFT OUTER JOIN "TARIFFS" ON "TARIFFS"."tariff_id,start_date" = "PRODUCT_TARIFFS"."[:tariff_id, :tariff_start_date]" WHERE (tariffs.amount < 5) ORDER BY "PRODUCT_TARIFFS"."PRODUCT_ID" ASC, "PRODUCT_TARIFFS"."TARIFF_ID" ASC, "PRODUCT_TARIFFS"."TARIFF_START_DATE" ASC FETCH FIRST :a1 ROWS ONLY
stmt.c:267:in oci8lib_260.bundle
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/ruby-oci8-2.2.8/lib/oci8/cursor.rb:131:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:140:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:41:in `block in exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/dbms_output.rb:36:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:24:in `exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:478:in `select'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:106:in `select_all'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:555:in `block (2 levels) in exec_queries'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/relation/finder_methods.rb:22:in `apply_join_dependency'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:550:in `block in exec_queries'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:547:in `exec_queries'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:422:in `load'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:200:in `records'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:195:in `to_ary'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/finder_methods.rb:532:in `find_nth_with_limit'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/finder_methods.rb:517:in `find_nth'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/finder_methods.rb:125:in `first'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/test/test_associations.rb:178:in `test_new_style_includes_with_conditions'
6) Error:
TestAssociations#test_limitable_reflections:
ActiveRecord::StatementInvalid: OCIError: ORA-00904: "MEMBERSHIPS"."user_id,group_id": invalid identifier: SELECT DISTINCT "MEMBERSHIPS"."USER_ID", "MEMBERSHIPS"."GROUP_ID" FROM "MEMBERSHIPS" LEFT OUTER JOIN "MEMBERSHIP_STATUSES" ON "MEMBERSHIP_STATUSES"."[:user_id, :group_id]" = "MEMBERSHIPS"."user_id,group_id" WHERE (membership_statuses.status = 'Active') FETCH FIRST :a1 ROWS ONLY
stmt.c:267:in oci8lib_260.bundle
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/ruby-oci8-2.2.8/lib/oci8/cursor.rb:131:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:140:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:41:in `block in exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/dbms_output.rb:36:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:24:in `exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:478:in `select'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:106:in `select_all'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/relation/finder_methods.rb:42:in `block in limited_ids_for'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/relation/finder_methods.rb:42:in `limited_ids_for'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/relation/finder_methods.rb:10:in `apply_join_dependency'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:550:in `block in exec_queries'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:547:in `exec_queries'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:422:in `load'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:200:in `records'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/delegation.rb:71:in `length'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/test/test_associations.rb:335:in `test_limitable_reflections'
7) Error:
TestAssociations#test_has_many_with_primary_key_with_associations:
ActiveRecord::StatementInvalid: OCIError: ORA-00904: "MEMBERSHIPS"."user_id,group_id": invalid identifier: SELECT "MEMBERSHIPS"."USER_ID" AS t0_r0, "MEMBERSHIPS"."GROUP_ID" AS t0_r1, "MEMBERSHIP_STATUSES"."ID" AS t1_r0, "MEMBERSHIP_STATUSES"."USER_ID" AS t1_r1, "MEMBERSHIP_STATUSES"."GROUP_ID" AS t1_r2, "MEMBERSHIP_STATUSES"."STATUS" AS t1_r3, "MEMBERSHIPS"."USER_ID" AS t0_r0, "MEMBERSHIPS"."GROUP_ID" AS t0_r1, "MEMBERSHIP_STATUSES"."ID" AS t1_r0, "MEMBERSHIP_STATUSES"."USER_ID" AS t1_r1, "MEMBERSHIP_STATUSES"."GROUP_ID" AS t1_r2, "MEMBERSHIP_STATUSES"."STATUS" AS t1_r3 FROM "MEMBERSHIPS" LEFT OUTER JOIN "MEMBERSHIP_STATUSES" ON "MEMBERSHIP_STATUSES"."[:user_id, :group_id]" = "MEMBERSHIPS"."user_id,group_id" WHERE (membership_statuses.status = 'Active')
stmt.c:267:in oci8lib_260.bundle
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/ruby-oci8-2.2.8/lib/oci8/cursor.rb:131:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:140:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:41:in `block in exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activesupport-5.2.4.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/dbms_output.rb:36:in `log'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-oracle_enhanced-adapter-5.2.8/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:24:in `exec_query'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:478:in `select'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:106:in `select_all'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:555:in `block (2 levels) in exec_queries'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/lib/composite_primary_keys/relation/finder_methods.rb:22:in `apply_join_dependency'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:550:in `block in exec_queries'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:547:in `exec_queries'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:422:in `load'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation.rb:200:in `records'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/activerecord-5.2.4.1/lib/active_record/relation/delegation.rb:71:in `length'
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/test/test_associations.rb:328:in `test_has_many_with_primary_key_with_associations'
190 runs, 486 assertions, 0 failures, 7 errors, 0 skips
rake aborted!
Command failed with status (1)
/Users/kbarret8/Desktop/devel/ruby/composite_primary_keys/Rakefile:34:in `block (3 levels) in <top (required)>'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `load'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:28:in `run'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/cli.rb:463:in `exec'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/cli.rb:27:in `dispatch'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/cli.rb:18:in `start'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Users/kbarret8/.rvm/gems/ruby-2.2.10/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'
/usr/local/opt/ruby/bin/bundle:23:in `load'
/usr/local/opt/ruby/bin/bundle:23:in `<main>'
Tasks: TOP => subtest_oracle
(See full trace by running task with --trace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment