This project is archived and is in readonly mode.
Sqlite adapter doesn't handle quoted table names properly
Reported by Frederick Cheung | April 17th, 2008 @ 07:34 PM
As of sqlite 3.5.7 (but not with 3.4.0), the sqlite adapter does not handle quoted table names properly. On 2.0.2 this was not apparent as its quote_table_name was a no-op, but this is not the case now. In particular this caused a number of eager loading failing tests.
The fix is simple: the following regular expression is used to turn foo.id into just foo
record[key.sub(/^\w+\./, '')] = row[key]
It should be
record[key.sub(/^"?\w+"?\./, '')] = row[key]
to cope with the possibility that the table name might be quoted
Comments and changes to this ticket
-
Frederick Cheung April 18th, 2008 @ 07:52 PM
- Title changed from Sqlite adapter does handle quoted table names properly to Sqlite adapter doesn't handle quoted table names properly
-
Michael Koziarski April 21st, 2008 @ 12:49 AM
- State changed from new to resolved
Applied at http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 6720 Parameter Filter not working Look at #8 the key is (action_dispatch.request.parameters...