This project is archived and is in readonly mode.
arel replacing first three objects of array for zeros in association queries
-
Josh Delsman
Not sure if this helps to narrow it down, but one work around is to do the following:
Order.joins(:client => :country) .where(:status => "completed") .where(:completed_at => Time.now.beginning_of_day..Time.now.end_of_day) .where(["`countries`.iso IN (?)", ["US", "CA", "MX"])This comes back with the correct, desired results, and uses the proper query structure.
-
David Trasbo
- Importance changed from to Low
So you're saying you're running your app using the
3-0-stablebranch? -
Josh Delsman
Yes, with arel 2.0.0 on master branch:
gem "rails", :git => "git://github.com/rails/rails.git", :branch => "3-0-stable" gem "arel", :git => "git://github.com/rails/arel" GIT remote: git://github.com/rails/arel revision: d68165501fc80bbce34c43eaaf48381bcca27c15 specs: arel (2.0.0.dev.20100924164835) GIT remote: git://github.com/rails/rails.git revision: 1a2b28c9d9deb7958124917195529f1b96b6bd82 branch: 3-0-stable -
David Trasbo
- Assigned user set to Aaron Patterson
Assigning this to Aaron as he's working on the Arel stuff at the moment.
-
Aaron Patterson
- State changed from new to resolved
Thanks for reporting this. I've fixed it in ARel here:
http://github.com/rails/arel/commit/7a625bf74e4e197746b857ae23b1a0f...