Forum: Ruby on Rails strange query like SELECT * FROM [Primary Key] = 0

Posted by speedzjw (Guest)
on 2012-11-28 11:14
(Received via mailing list)
I am use ROR v= 2.3.4

in my console.  i found a strange query SELECT * FROM [Primary Key(id)] 
=
0,
because of i had changed the id[Primary Key] from int to varchar. ruby 
on
rails still query the db on int like 0 use int not '0'.
such kind query cost too much db resource. and i don't konw how to 
prevent
such query.

please help.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.