solution provided) Oracle table names with schemas handled incorrectly 
-----------------------------------------------------------------------

                 Key: JRUBY-1638
                 URL: http://jira.codehaus.org/browse/JRUBY-1638
             Project: JRuby
          Issue Type: Bug
          Components: ActiveRecord-JDBC
    Affects Versions: JRuby 1.0.2
            Reporter: Bernie T


When you try to do this:
  set_table_name "schema.tablename" 
with the Oracle adapter, scaffolding and other table info-gathering functions 
break. 

SVN commit #738 implements a fix for this problem in Postgres, and since the 
same problem exists for Oracle, I tried
it and it fixed the oracle adapter. I'm not sure if this ticket comprises a 
"patch," so I left the box unchecked.

Just override the columns method as in Postgres fix #738 with the following:

    def columns(table_name, name=nil)
      if table_name =~ /\./
        parts = table_name.split(/\./)
        table_name = parts.pop
        schema_name = parts.join(".")
            @connection.columns_internal(table_name, name, schema_name)
      else
            @connection.columns_internal(table_name, name)
      end
    end


Regards,
Bernie

P.S.  I submitted this same message to RubyForge, thinking that was the right 
place to submit stuff. Clearly I was wrong, but nothing in RubyForge said that 
their issue tracker was the wrong one. Is there any way to disable that so 
people don't waste time trying to submit stuff to that database?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to