sdsykes / slim_scrooge

SlimScrooge heavily optimises your database interactions
313 stars 25 forks source link

ActiveRecord::StatementInvalid - PG::Error: ERROR: column "X" does not exist #31

Open RedaBenh opened 8 years ago

RedaBenh commented 8 years ago

slim_scrooge doesn't work with ruby-1.9 and rails-3.2.19 !

I get this error for every query with includes methods.

ActiveRecord::StatementInvalid - PG::Error: ERROR:  column "X" does not exist

Where X is a number (id in my query)

See an example for a real issue:

ActiveRecord::StatementInvalid - PG::Error: ERROR:  column "16" does not exist
LINE 1: ...n","services"."id" FROM "services" WHERE "id" IN ("16","17",...

My env Env:

$ ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin14.0.0]
$ rails -v
Rails 3.2.19
sdsykes commented 8 years ago

I'll merge a patch if you have one, but I'm sorry I don't have the possibility to investigate the problem.