activerecord-jdbc-adapter icon indicating copy to clipboard operation
activerecord-jdbc-adapter copied to clipboard

CPK, Oracle & activerecord-jdbc-adapter problem with arel_attributes_values

Open consu opened this issue 14 years ago • 2 comments

Hello,

I'm using Composite Primary Keys with Rails 3, Oracle and jruby / activerecord-jdbc-adapter. ActiveRecord-JDBC-Adapter overrides arel_attributes_values (quoted_primary_key.rb), but this change isn't working with cpk.

Is this a cpk or activerecord-jdbc-adapter issue?

I have commented out all changes in quoted_primary_key.rb and now my code seams t o work. Is this special handling for Oracle + Rails 3 still necessary?

Regards Dieter

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

consu avatar Apr 26 '11 09:04 consu

Thanks for submitting. Which version of Rails are you using? It's possible that Arel has changed enough since the most recent release that this isn't necessary, or there could be some other edge case that you're not hitting.

If you want to disable QuotedPrimaryKeyExtension in your project, you might consider doing something like:

require 'arjdbc/jdbc/quoted_primary_key'
module ArJdbc::QuotedPrimaryKeyExtension; def self.extended(*); end; end

in a Rails initializer and see if that monkey-patches it off.

nicksieger avatar May 03 '11 16:05 nicksieger

I'm using Rails 3.0.7. I did create a custom monkey-patch with a loop around every primary key column, like you did it for a single primary key.

consu avatar May 04 '11 06:05 consu