# ActiveRecord adding quotes where it should not using JDBC Oracle Driver

**URL:** <https://www.ruby-forum.com/t/activerecord-adding-quotes-where-it-should-not-using-jdbc-oracle-driver/150485>\
**Category:** Rails\
**Created:** [October 9, 2008, 2:03am UTC](https://www.ruby-forum.com/t/activerecord-adding-quotes-where-it-should-not-using-jdbc-oracle-driver/150485 "2008-10-09T02:03:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidPaquet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a587f6/32.png) [@DavidPaquet](https://www.ruby-forum.com/u/DavidPaquet)\
**Post date:** [October 9, 2008, 2:03am UTC](https://www.ruby-forum.com/t/activerecord-adding-quotes-where-it-should-not-using-jdbc-oracle-driver/150485/1 "2008-10-09T02:03:03Z")

</div>

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 ?
