Cannot access Result rows or columns.
mattsgarrison opened this issue · 1 comments
Whenever I attempt to view a report (any format, but I'll list the errors from attempting to view the HTML format here), I get errors when trying to access anything in the Dossier::Result class related to rows and columns.
However, when I jump into Rails Console, I can create a new report (@rpt
for example), run it, data returns as expected, and I can access column names via @rpt.results.adapter_results.result[0].keys
.
My hunch is something has gone wrong for me in the lib/Adapter/ActiveRecord/Result.rb but I can't figure out what would be causing it to not see the standard AR methods. Any insight would be appreciated, as this looks like an awesome tool.
Be warned, my configuration might be creating edge cases, so if it's something strange because of that, I won't be surprised. Here's are the relevant lines from my framework trace:
/home/mattgarrison/.rvm/gems/jruby-1.7.2@torquebox-rails/bundler/gems/dossier-6b69abdf44da/lib/dossier/adapter/active_record/result.rb:17:in `rows'
/home/mattgarrison/.rvm/gems/jruby-1.7.2@torquebox-rails/bundler/gems/dossier-6b69abdf44da/lib/dossier/result.rb:47:in `each'
org/jruby/RubyEnumerable.java:383:in `to_a'
/home/mattgarrison/.rvm/gems/jruby-1.7.2@torquebox-rails/bundler/gems/dossier-6b69abdf44da/lib/dossier/result.rb:25:in `rows'
/home/mattgarrison/.rvm/gems/jruby-1.7.2@torquebox-rails/bundler/gems/dossier-6b69abdf44da/lib/dossier/result.rb:17:in `body'
org/jruby/RubyBasicObject.java:1671:in `__send__'
I'm using the current git repo source for Dossier, JRuby 1.7.2, Torquebox 2.3, Rails 3.2.12 and the following ActiveRecord gems: 'activerecord-jdbc-adapter', 'jdbc-mssql-azure', 'activerecord-jdbcmssql-adapter', 'composite_primary_keys'. Dossier is the last gem in my gemfile too.
Nevermind, I narrowed this down to a discrepancy with the JDBC adapter not returning a ActiveRecord::Result object from an exec_query, it's not a problem with Dossier. Please ignore this issue.