Bugs item #18059, was opened at 2008-02-14 06:12
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=18059&group_id=2014

Category: AR-JDBC
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Christian Seiler (chrismuc)
Assigned to: Nobody (None)
Summary: Rails 2.0 Query Cache not working

Initial Comment:
Rails 2.0.2, AR-JDBC 0.7.2, JRuby trunk rev 5928: The query cache is not 
working.

It turned out that the JdbcAdapter class has a "select_all" method (in 
active_record/connection_adapters/jdbc_adapter.rb),
which seems to overwrite/redefine the "select_all" method, which has been 
prepared by query_cache.rb.
This results in the "select_all_with_query_cache" not being called.

The "select_all" method is the same as the original one in AR's 
database_statement.rb, so I decided to simply
remove the method as a workaround. I've added the following line to my 
environment.rb:

::ActiveRecord::ConnectionAdapters::JdbcAdapter.send('remove_method', 
'select_all') if RUBY_PLATFORM =~ /java/


Note that query_cache.rb also creates a cached version of the "columns" method.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=18059&group_id=2014
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to