Permalink
Browse files

Merge branch 'master' of github.com:jruby/activerecord-jdbc-adapter

  • Loading branch information...
2 parents 0480770 + e02190c commit 48ffd36531c142bc20432a31d0b90c9aff417ba5 @nicksieger nicksieger committed Feb 17, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/arjdbc/db2/adapter.rb
@@ -502,9 +502,14 @@ def db2_schema
# AS400 implementation takes schema from library name (last part of url)
schema = @config[:url].split('/').last.strip
(schema[-1..-1] == ";") ? schema.chop : schema
- else
+ elsif @config[:username].present?
# LUW implementation uses schema name of username by default
- @config[:username] or ENV['USER']
+ @config[:username]
+ elsif @config[:jndi].present?
+ # let jndi worry about schema
+ nil
+ else
+ ENV['USER']
end
else
@config[:schema]

0 comments on commit 48ffd36

Please sign in to comment.