This project is archived and is in readonly mode.

#2668 ✓resolved
Benjamin Floering

ActiveRecord limited eager loading associations with numbers in the name fix

Reported by Benjamin Floering | May 18th, 2009 @ 08:12 AM | in 2.x

Something since ActiveRecord 2.0 has broken this, and upgrading to 2.3 has made this apparent. Attached is the patch with tests. Basic problem:

Limited eager loading performs detection of tables to include in the initial id load query, but if an association has a number in it it won't be detected as a table and this results in a malformed query and SQL error.

Confirmed this is an issue for all DB types and tests ran on MySQL and sqlite3.

Comments and changes to this ticket

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>

Attachments