You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am in the process of updating a rails application from rails 6.1.4 on ruby 3.0.4p208 to 7.0.4 on ruby 3.1.3 stable. I had passing tests on 6.1.4 ruby 3.1.3 stable, but failures on 7.0.4 r3.1.3 stable and I have traced them to a failure of my emulate_booleans setting in my application.rb file to be picked up. It is set to false. It is being treated as if it is set to true in the rails 7 configuration.
I tried creating a separate initializer oracle.rb but that had no impact.
I manually edited the oracle_enhanced_adapter.rb file and set emulate_booleans to false and my application and tests ran normally and as expected so I can confirm the setting is no longer being picked up in my application.rb or initializers.
Expected behavior
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_booleans = false
in my application.rb file should allow my NUMBER(1) columns to be treated as integers instead of booleans. This was happening for instances of my application up to and including rails 6.1.4 ruby 3.1.3 stable.
Actual behavior
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_booleans = false
in my application.rb file is being ignored and any NUMBER(1) columns in my application are being treated as booleans, which breaks my application and its tests.
Steps to reproduce
I am in the process of updating a rails application from rails 6.1.4 on ruby 3.0.4p208 to 7.0.4 on ruby 3.1.3 stable. I had passing tests on 6.1.4 ruby 3.1.3 stable, but failures on 7.0.4 r3.1.3 stable and I have traced them to a failure of my emulate_booleans setting in my application.rb file to be picked up. It is set to false. It is being treated as if it is set to true in the rails 7 configuration.
I tried creating a separate initializer oracle.rb but that had no impact.
I manually edited the oracle_enhanced_adapter.rb file and set emulate_booleans to false and my application and tests ran normally and as expected so I can confirm the setting is no longer being picked up in my application.rb or initializers.
Expected behavior
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_booleans = false
in my application.rb file should allow my NUMBER(1) columns to be treated as integers instead of booleans. This was happening for instances of my application up to and including rails 6.1.4 ruby 3.1.3 stable.
Actual behavior
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_booleans = false
in my application.rb file is being ignored and any NUMBER(1) columns in my application are being treated as booleans, which breaks my application and its tests.
System configuration
Rails version: 7.0.4
Oracle enhanced adapter version: 7.0.2
Ruby version: 3.1.3 stable
Oracle Database version: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit
NOTE: I am using cpk gem: gem 'composite_primary_keys', '
> 14.0.4'> 2.2.12"also "ruby-oci8", "
and "ruby-plsql", "~> 0.8"
The text was updated successfully, but these errors were encountered: