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

Ticket #11490 (new defect)

Opened 2 months ago

[PATCH] habtm error when eagerly loading the other side of the association

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

Description

Executing this on a has_and_belongs_to_many association produces an error:

Developer.find(1).projects.find(:all, :include => :developers)

AR doesn't disambiguate fields properly when find is called on a habtm association including the other side of the association

Attachments

habtm_eager_loading_other_side_of_association.diff (2.2 kB) - added by cavalle on 03/31/08 22:05:25.
Tests and patch attached

Change History

03/31/08 22:05:25 changed by cavalle

  • attachment habtm_eager_loading_other_side_of_association.diff added.

Tests and patch attached