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

Ticket #11517 (new defect)

Opened 1 month ago

[PATCH] Fix limited eager loading when :order references an aliased table name

Reported by: jonathan_viney Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords:
Cc:

Description

The query that selects the id values when doing limited eager loading incorrectly removes tables referenced by their aliased name in the :order or :conditions string. This was introduced by r8977.

Small patch attached to check the aliased table name instead of the base table name. Test included.

Attachments

eager_include_with_order_on_aliased_table_name_and_limit.patch (1.4 kB) - added by jonathan_viney on 04/03/08 08:17:09.

Change History

04/03/08 08:17:09 changed by jonathan_viney

  • attachment eager_include_with_order_on_aliased_table_name_and_limit.patch added.