undefined method primary_key
tispratik opened this issue · comments
Pratik Khadloya commented
When am trying to execute a select on an oracle database am getting the following error.
class Poc
dbh = RDBI.connect(RDBI::Driver::JDBC, :database => "oracle:thin:@XXX:1521:XXX", :username => "XXX", :password => "XXX")
result = dbh.execute("select SYSDATE from dual")
puts result.fetch(:first)
end
→ ruby rdbi_test.rb
/home/pratikk/Projects/test/rdbi-driver-jdbc/lib/rdbi/driver/jdbc.rb:300:in `new_execution': undefined method `primary_key=' for #<RDBI::Column:0x1bab2a6> (NoMethodError)
from org/jruby/RubyRange.java:403:in `each'
from /home/pratikk/Projects/test/rdbi-driver-jdbc/lib/rdbi/driver/jdbc.rb:291:in `new_execution'
from /home/pratikk/.rvm/gems/jruby-1.6.0.RC1/gems/rdbi-0.9.1/lib/rdbi/statement.rb:163:in `execute'
from /home/pratikk/.rvm/gems/jruby-1.6.0.RC1/gems/rdbi-0.9.1/lib/rdbi/database.rb:189:in `execute'
from rdbi_test.rb:13:in `Poc'
from rdbi_test.rb:7:in `(root)'
Shane Emmons commented
rdbi-driver-jdbc is only working with rdbi-head right now. Once rdbi 1.0 is release (hopefully this weekend), I'll package this as a gem and push to RubyGems. In the meantime, if you fork rdbi and install it, you should be all set.
Pratik Khadloya commented
Oh ok. Thanks for the information.