This project is archived and is in readonly mode.
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
-
Benjamin Floering May 18th, 2009 @ 08:17 AM
- Title changed from AR limited eager loading associations with numbers in the name fix to ActiveRecord limited eager loading associations with numbers in the name fix
-
CancelProfileIsBroken May 18th, 2009 @ 11:36 AM
- Tag changed from activecord, association, eagerloading, eager_loading, numeric to activecord, association, eagerloading, eager_loading, numeric, pat
-
Repository May 18th, 2009 @ 12:57 PM
- State changed from new to resolved
(from [27de7f150b57a18d4ccdd274f6f8b621b58108c6]) Fixed limited eager loading associations with numbers in the name [#2668 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/27de7f150b57a18d4ccdd274f6f8b6...
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
Referenced by
- 3592 ActiveRecord::Associations::ClassMethods tables_in_string does not recognize digits in table name Ticket #2668 has a patch for this.
- 2668 ActiveRecord limited eager loading associations with numbers in the name fix (from [27de7f150b57a18d4ccdd274f6f8b621b58108c6]) Fixed l...
- 3592 ActiveRecord::Associations::ClassMethods tables_in_string does not recognize digits in table name #2668