Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #2919 (closed defect: duplicate)

Opened 4 years ago

Last modified 4 years ago

should quote table names

Reported by: kitti.k@gmail.com Assigned to: Jeremy Kemper <rails@bitsweat.net>
Priority: high Milestone: 1.1
Component: ActiveRecord Version: 0.14.3
Severity: normal Keywords: quote quoting table
Cc:

Description

If we create an ActiveRecord model named privilege which uses table privileges, it throws an sql error, saying there's an error in sql when i try to do any database operations with the model, i think its happening because privileges might be a keyword in mysql, adding backquotes to table name in the query fixed it. Right now i am using a different table name as a work around.

Change History

11/17/05 20:32:15 changed by bitsweat

  • keywords set to quote quoting table.
  • owner changed from David to bitsweat.
  • priority changed from normal to high.
  • summary changed from creating model named privilege with table named privileges in mysql to should quote table names.
  • milestone changed from 1.0 to 1.1.

02/13/06 10:08:20 changed by BobSilva

  • status changed from new to closed.
  • resolution set to duplicate.

Ticket #3631