Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
--- activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb~ 2010-04-03 14:20:10.909805506 +0530
+++ activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb 2010-04-03 20:50:20.308164645 +0530
@@ -63,11 +63,13 @@
extend JdbcSpec::ActiveRecordExtensions
- alias :attributes_with_quotes_pre_oracle :attributes_with_quotes
- def attributes_with_quotes(include_primary_key = true, *args) #:nodoc:
- aq = attributes_with_quotes_pre_oracle(include_primary_key, *args)
- if connection.class == ConnectionAdapters::JdbcAdapter && (connection.is_a?(JdbcSpec::Oracle) || connection.is_a?(JdbcSpec::Mimer))
- aq[self.class.primary_key] = "?" if include_primary_key && aq[self.class.primary_key].nil?
+ if(respond_to? :attributes_with_quotes)
+ alias :attributes_with_quotes_pre_oracle :attributes_with_quotes
+ def attributes_with_quotes(include_primary_key = true, *args) #:nodoc:
+ aq = attributes_with_quotes_pre_oracle(include_primary_key, *args)
+ if connection.class == ConnectionAdapters::JdbcAdapter && (connection.is_a?(JdbcSpec::Oracle) || connection.is_a?(JdbcSpec::Mimer))
+ aq[self.class.primary_key] = "?" if include_primary_key && aq[self.class.primary_key].nil?
+ end
+ aq
end
- aq
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment