DavidPaquet
2008-Oct-09 00:02 UTC
ActiveRecord adding quotes where it should not using JDBC Oracle Driver
Hi everyone, So here is my problem : I''m using the Oracle JDBC Driver (with JRuby) to talk to a legacy database. I also use set_table_name directive since my model doesn''t have the same name as my table. class Person < ActiveRecord::Base set_table_name ''BOTS.USERS'' In the console, if I try Person.find(1) I get an error saying that the table doesn''t exit. The query generated is : SELECT * FROM "BOTS.USERS" WHERE ("BOTS.USERS".id = 1) The thing is that this is not valid, it should be : SELECT * FROM BOTS.USERS WHERE (BOTS.USERS.id = 1) How could I fix this ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---