Displaying 1 result from an estimated 1 matches for "t1control".
Did you mean:
trcontrol
2006 Jun 23
0
ActiveRacord::Base find does not support HAVING ?!
...options = {
:select=>''t1.*, count(c2)'',
:joins=> ''AS t1 LEFT JOIN t2 ON t1.ID=t2.t1_id'',
:group=> ''t1.id'',
:having=> "count(c2) = #{my_var}"
}
T1.find(:all,options)
But I got the following error:
ArgumentError in T1Controller#action1
Unknown key(s): having
lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/hash/keys.rb:48:in
`assert_valid_keys''
lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1325:in
`validate_find_options''
lib/ruby/gems/1.8/gems/activereco...