Title: [751] trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_oracle.rb: Handle a test sending in a symbol as column name correctly in Oracle
- Revision
- 751
- Author
- olabini
- Date
- 2007-09-26 12:31:58 -0400 (Wed, 26 Sep 2007)
Log Message
Handle a test sending in a symbol as column name correctly in Oracle
Modified Paths
Diff
Modified: trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_oracle.rb (750 => 751)
--- trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_oracle.rb 2007-09-26 15:51:37 UTC (rev 750)
+++ trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_oracle.rb 2007-09-26 16:31:58 UTC (rev 751)
@@ -135,7 +135,7 @@
if pk.nil? # Who called us? What does the sql look like? No idea!
execute sql, name
elsif id_value # Pre-assigned id
- log(sql, name) { @connection.execute_insert sql,pk }
+ execute sql, name
else # Assume the sql contains a bind-variable for the id
id_value = select_one("select #{sequence_name}.nextval id from dual")['id'].to_i
log(sql, name) {
@@ -293,7 +293,7 @@
# camelCase column names need to be quoted; not that anyone using Oracle
# would really do this, but handling this case means we pass the test...
def quote_column_name(name) #:nodoc:
- name =~ /[A-Z]/ ? "\"#{name}\"" : name
+ name.to_s =~ /[A-Z]/ ? "\"#{name}\"" : name.to_s
end
def quote_string(string) #:nodoc:
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel