I am converting my rails application(working fine) to jruby. I am using
db2 database, and connecting to it through activerecord-jdbc-adapter
gem. My db2 database has many schemas, and I have to query tables in
different schemas. My database.ywml file declares production environment
as :
adapter: jdbc
driver: com.ibm.db2.jcc.DB2Driver
url: jdbc:db2://remoteserver.com:50000/DB_NAME
username: uname
password: pwd
My questions is where can I specify the schema for my tables. e.g I have
a model like this
class User < ActiveRecord::Base
end
and when I query for this model, the query generated is
select * from uname.user
but table ‘user’ is located in ‘myschema’, and it has assumed to use
‘uname’ schema for the user ‘uname’. How, can i change configuration so
that query generated by adatper is
select * from myschema.user
any suggestion?
thanks,
Farooq