Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Loading development environment (Rails 2.3.2)
- c = Category.all
- c >> c = Category.all
- => [#<Category id: 1, category: "bar / club", permalink: "bar-club", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>, #<Category id: 2, category: "venue / arena", permalink: "venue-arena", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>, #<Category id: 3, category: "outdoors", permalink: "outdoors", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>, #<Category id: 4, category: "gallery", permalink: "gallery", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>, #<Category id: 5, category: "private venue/house", permalink: "private-venuehouse", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>]
- >> c = Category.find(:all, :group => "category")
- ActiveRecord::StatementInvalid: RuntimeError: ERROR C42803 Mcolumn "categories.id" must appear in the GROUP BY clause or be used in an aggregate function Fparse_agg.c L330 Rcheck_ungrouped_columns_walker: SELECT * FROM "categories" WHERE (categories.deleted_at IS NULL OR categories.deleted_at > '2009-06-24 09:07:09.025047') GROUP BY category
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:212:in `log'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:507:in `execute'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:985:in `select_raw'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:972:in `select'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:661:in `find_by_sql'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1553:in `find_every_with_deleted'
- from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid.rb:162:in `find_every'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2148:in `with_scope'
- from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid.rb:148:in `with_deleted_scope'
- from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid.rb:162:in `find_every'
- from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:615:in `find_without_find_wrapper'
- from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid_find_wrapper.rb:79:in `send'
- from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid_find_wrapper.rb:79:in `find'
- from (irb):2
Add Comment
Please, Sign In to add comment