Actions
Bug #8344
opentaxonomies can not be eager loaded
Status:
New
Priority:
Normal
Assignee:
-
Category:
Organizations and Locations
Target version:
-
Description
a simple query like
Medium.includes(:locations)
returns
Hirb Error: Association named 'taxable_taxonomies' was not found; perhaps you misspelled it? /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:150:in `block in records_by_reflection' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:146:in `each' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:146:in `group_by' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:146:in `records_by_reflection' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:139:in `grouped_records' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:130:in `preload_one' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:109:in `preload' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:98:in `block in run' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:98:in `each' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:98:in `run' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader/through_association.rb:34:in `through_records_by_owner' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader/through_association.rb:15:in `associated_records_by_owner' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader/has_many_through.rb:8:in `associated_records_by_owner' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader/collection_association.rb:13:in `preload' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader/association.rb:19:in `run' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:132:in `block (2 levels) in preload_one' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:131:in `each' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:131:in `block in preload_one' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:130:in `each' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:130:in `preload_one' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:109:in `preload' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:98:in `block in run' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:98:in `each' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/associations/preloader.rb:98:in `run' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation.rb:181:in `block in exec_queries' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation.rb:180:in `each' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation.rb:180:in `exec_queries' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation.rb:160:in `block in to_a' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/explain.rb:41:in `logging_query_plan' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation.rb:159:in `to_a' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/bullet-4.14.0/lib/bullet/active_record3x.rb:10:in `to_a' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation.rb:189:in `exec_queries' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation.rb:160:in `block in to_a' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/explain.rb:34:in `logging_query_plan' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation.rb:159:in `to_a' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/bullet-4.14.0/lib/bullet/active_record3x.rb:10:in `to_a' /home/ohad/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-3.2.20/lib/active_record/relation/delegation.rb:6:in `to_ary'
Updated by Dominic Cleal over 9 years ago
- Category set to Organizations and Locations
Actions