Don Stocks
2006-Jul-07 07:03 UTC
[Rails] Pessimistic Locking Plugin Breaks ActiveRecord::Base.count()
After installing the PessimisticLocking plugin I noticed that ActiveRecord''s count method no longer works (see below). If I remove the plugin it resolves the problem. I need both. Any ideas? I have also read that Pessimistic Locking is now baked into ActiveRecord in Edge Rails. I have tried Rails 1.1.2 and 1.1.4 and that doesn''t seem to be the case. Any idea when it''ll be in a production release? - Don>> Job.countArgumentError: wrong number of arguments (2 for 3) from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:156:in `add_limit!'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:156:in `construct_calculation_sql'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:161:in `execute_simple_calculation'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:141:in `calculate'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:64:in `count'' from (irb):1>>-- Posted via http://www.ruby-forum.com/.
Francesco Levorato
2006-Jul-07 08:29 UTC
[Rails] Pessimistic Locking Plugin Breaks ActiveRecord::Base.count()
On 7/7/06, Don Stocks <amillionhitpoints@yahoo.com> wrote:> > After installing the PessimisticLocking plugin I noticed that > ActiveRecord''s count method no longer works (see below). If I remove > the plugin it resolves the problem. > > I need both. Any ideas?Hi Don, No ideas about the issue itself.> I have also read that Pessimistic Locking is now baked into ActiveRecord > in Edge Rails. I have tried Rails 1.1.2 and 1.1.4 and that doesn''t seem > to be the case. Any idea when it''ll be in a production release?Edge Rails contains latest bleeding edge love to Rails and is the target of new improvements. The 1.1.* series are instead a STABLE branch of Edge Rails to which only bug fixes and minor non-backward incompatible changes are committed.>From the RoR weblog: "All of the new features we''ve been working onover the last couple of months will become available in 1.2.0, which is scheduled for "soonish". Cheers. -- francesco levorato aka flevour http://www.flevour.net/