Permalink
Browse files

Fixed if the primary_key is defined as a symbol it won't find it for …

…certain types of updates
  • Loading branch information...
1 parent 4f7a3b6 commit f1f15f945ed379986ffb037e1f310a7bba08b065 @CoryFoy committed May 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/active_record/connection_adapters/oracle_enhanced_adapter.rb
@@ -870,7 +870,7 @@ def write_lobs(table_name, klass, attributes) #:nodoc:
if is_with_cpk
id = klass.primary_key.map {|pk| attributes[pk.to_s] }
else
- id = quote(attributes[klass.primary_key])
+ id = quote(attributes[klass.primary_key.to_s]) #fix or else it can't find it if attributes are quoted and this is a symbol
end
klass.columns.select { |col| col.sql_type =~ /LOB$/i }.each do |col|
value = attributes[col.name]

0 comments on commit f1f15f9

Please sign in to comment.