Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkristian/354617 to your computer and use it in GitHub Desktop.
Save mkristian/354617 to your computer and use it in GitHub Desktop.
--- 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